this just needs statements for each question written in MYSQL only. thanks 24. (
ID: 3878916 • Letter: T
Question
this just needs statements for each question written in MYSQL only. thanks
24. (3 points) Display the lastname, firstname and major for students who are either majors or are undecared. You should have 4 records. 25. (3 points) Display the lastname, firstname and major for all students who have graduated or are If you anly have io, verify that Tanya Roberts is undedare. Make undeclared. You should have 11 rows. any necessary changes. 26. (5 points) Display the lastname, firstname and major for all students are Ct or undedared majors and who were admitted between January 1, 1970 and December 31, 1979. You should have 3 rows. If you only have 2, verify that Tanya Roberts is undecdared 27.(3 points) Display all the columns for the student that was admitted first using the LIMIT keyword. Display the output in vertical formatExplanation / Answer
-- asuming major is not NULL if column contain null or empty column instead oF undeclared use below
--major IS NULL (in where clause)
SELECT Lastname,Firstname,major FROM students
WHERE major='CIT' or major='undeclared';
SELECT Lastname,Firstname,major FROM students
WHERE major='graduated' or major='undeclared';
SELECT Lastname,Firstname,major FROM students
WHERE (major='CIT' or major='undeclared') AND
(DATE(admitted) BETWEEN '1970-01-01' AND '1979-12-31') ;
SELECT * FROM students ORDER BY admitted ASC
LIMIT N;--N is number oF columns assume N=10 ,retrieve 10 columns
--u need to provide value instead oF N
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.