Levels Tought:
Elementary,Middle School,High School,College,University,PHD
Teaching Since: | Jul 2017 |
Last Sign in: | 209 Weeks Ago, 4 Days Ago |
Questions Answered: | 15833 |
Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
Some query question
Â
 students(sid,name,age,gpa)
• courses(cid,deptid, description)
• professors(ssn,name,address,phone,deptid)
• enrollment(sid,cid,section,grade). cid makes reference to the courses table.
• teaches(cid,section,ssn). cid, section makes reference to the enrollment table8. Assume that small sections have less than 30 students, medium sections have at least 30
students but less than 80, and sections have at least 80 students.
Your result table should have the following rows and columns:
deptid small medium large
cs
math
... ... ... ...
Each table entry must have the number of sections of a given size offered by each department.
9. List of professors that work for departments with more than 20 faculty members and that offer
more large sections than small and medium sections combined.
10. Assume grades are A, B, C, D, F where D and F are failing grades. For each course (section)
find the percentage of students that failed the course.
11. Find the name of the professor with the maximum percentage of students that failed his course.
12. On average what percentage of students fail a course? (total number of students that failed a
course / total number of enrolled students).
13. Find a list of courses (sections) where the percentage of students with D or F is greater than
average.
114. Write a query that produces the following table:
deptid SPS % A % B % C % D % F
cs
math
... ... ... ... ... ... ...
Where SPS is the average number of students in each section and column %A has the per-centage of students that got an A, and so on, over all the courses offered by each department.
----------- Â ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly