Refer to Figure II Write the SQL statement for the following: Write a SQL query
ID: 658867 • Letter: R
Question
Refer to Figure II
Write the SQL statement for the following:
Write a SQL query to find the number of female enrollments in each department. The same woman signing up for two different courses in the same department counts as two separate enrollments. The query should show the name of each department and its number of female enrollments, and it should be sorted from largest to smallest number of enrollments, largest first.
Explanation / Answer
SELECT COURSES.DEPARTMENT, STUDENTS.SEX
FROM COURSES, STUDENTS
WHERE STUDENTS.SEX="F"
GROUP BY COURSES.DEPARTMENT,
ORDER BY STUDENTS.SEX DESC;
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.