I tried solving the below question.I just want to make sure if I am correct.
student(student-name, street, city)
offering(department, number, section, time, population)
titles(department, number, title)
enrollment(student-name, department, number, section)
If I need to find The department, number, section, title, and population for every course section
The SQL query I tried is :
select a.department, a.number, a.section,b.title,population as "students"
from offering a ,titles b ,enrollment c,student d
where a.department=b.department
and a.number=b.number
and a.department=c.department
and a.number=c.number
and a.section=c.section
group by a.section
Please let me know if I am correct.
Thank you for your time and patience.