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

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.

total number of enrollments for each course. Arrange by course number. Show zero for courses with no students enrolled COURSE NO DESCRIPTION ENROLLMENTS 120 Intro to Java Programming 23 122 Intermediate Java Programming 24 124 Advanced Java Programming 8 125 Java Developer I 8 146 Java for C/C++ Programmers 3 350 Java Developer II 9 430 Java Developer III 0 450 DB Programming with Java 1 (8 Rows)

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.