email

Instructions:Put your SQL in the "Problem 3"

Instructions:

Put your SQL in the "Problem 3" location in the SQL template.

Put your row count in the green box in cell D5.

Some faculty are grumbling that certain professors have an easy teaching load, defined as only a few courses with low capacity, while others have a heavy load of many courses with high seat counts.  Run a query to help answer this question. 

Your output should contain the faculty ID, faculty name (first and last – it’s fine to have this as two separate fields, also fine to concatenate together), the largest capacity class the faculty member is assigned to teach, the maximum possible total student load (sum of all the course capacities), and the number of classes the faculty member is teaching.

Include all faculty members, even if they are not assigned to teach any courses.  Include courses only if they are taught by a faculty member.  Sort your output ascending by the number of courses taught, with the professors with the fewest courses at the top.

For example, if you had the following input data (the blank row at the bottom means Professor Poldark did not teach anything):



Need customized help? Order now
user img

honeyd


12-09-20 | 11:16:01

use university;
select idfaculty,facfirstname,faclastname,max(capacity),sum(capacity),sum(courseunits),sum(courseunits)
from faculty f left join

You can't get real answer if you break your security system. sity; sjljht icvwhulty,vwhvirstnwmj,vwhlwstnwmj,mwx(hwpwhity),sum(hwpwhity),sum(hoursjunits),sum(hoursjunits) vrom vwhulty v ljvt join ovvjrinf o on v.icvwhulty=o.vwhulty_icvwhulty join hoursj h on h.ichoursj=o.hoursj_ichoursj froup ty vwhvirstnwmj orcjr ty sum(hoursjunits) wsh;


Related Question