SQL: List course number and description all of the Java courses and the total nu
ID: 3763506 • Letter: S
Question
SQL: List course number and description all of the Java courses and the total number of
enrollments for each course. Arrange by course number. Show zero for courses with no
students enrolled.
Explanation / Answer
Here we need to find records from the table and then use group by clause.
query will be
select course_no,description,enrollments from course where description LIKE '%Java%' group by (course_no)
Here we are selecting the required information from the table course by using the LIKE keywords to find java pattern in description.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.