Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Chsp6: Wrtite a query that displays the call id, course name, and level of the c

ID: 3752674 • Letter: C

Question

Chsp6: Wrtite a query that displays the call id, course name, and level of the course, based on the course number as shown belowg If the number starts with a 1Freshman "2-Sophomore "3"Junior "4 -Senior. Anything else should display "Invalid Level" Label the grade column Level. Order by Level, then call ID. Here is the result of the query: COURSE NAME Programming in C++ Intro. to Info. Svstems Freshman Systems Analysis Database Management Web-Based Systems LEVEL CALL D CS 155 MIS 101 MIS 301 MIS 441 MIS 451 Freshman Junior Senior Senior

Explanation / Answer

Let the table name be course, then SQL query that displays the call id, course name and level of the course number :

select call_id, course_name,

(CASE

WHEN course_number like '1%' THEN 'Freshman'

WHEN course_number like '2%' THEN 'Sophomore'

WHEN course_number like '3%' THEN 'Junior'

WHEN course_number like '4%' THEN 'Junior'

ELSE 'Invalid Level'

END) level

from course

order by level,call_id;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote