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

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.

These figures show cunege enronments for a singre semeser. I me sex students name contains "M" for males and "F" for females, and the grade field in the Enrolls table contains a numerical grade, such as 4.0 for an "A", 3.0 for a "B", and so forth. Departments in the Courses table are identified by their names, which are unique.

Explanation / Answer

SELECT COURSES.DEPARTMENT, STUDENTS.SEX

FROM COURSES, STUDENTS

WHERE STUDENTS.SEX="F"

GROUP BY COURSES.DEPARTMENT,

ORDER BY STUDENTS.SEX DESC;

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