subject

Given the following tables: • students(sid, name, age, gpa) • courses (cid, deptid, name) • professors(ssn, name, address, phone, deptid) • enrollment(sid, cid, section, grade, foreign key (sid) references students, foreign key (cid) references courses, foreign key (cid, section) references teaches) • teaches(cid, section, ssn, foreign key (cid) references courses, foreign key (ssn) references professors) Domain • cid is in {'198:11','640:151','198:112,...} • deptid is in {'cs', 'math', 'music ,...} • grade is in 'A','B','C',...} • section, age, son are an integers • address, phone, name are strings • gpa is float Provide SQL instructions for each of the following questions 8. Assume that small sections have less than 30 students, medium sections have at least 30 students but less than 80, and large 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.
14. Write a query that produces the following table: deptid SPS % A % B % C % D % F 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 denartment.

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 19:40, Dogtes9667
Consider the following generator matrix: g= (1 0 0 0 1 0 0 0 1 1 1 1 1 0 1 1 1 0) find all the codewords generated by this generator matrix. determine the number of errors that this code will detect. determine the number of errors that this code will correct. prove that a linear code's minimum weight is equivalent to its minimum distance. that is, where c is a linear code, dist(c) = wh(c)
Answers: 1
image
Computers and Technology, 22.06.2019 07:30, ghopk5929
In the film "epic 2015," epic is the name for:
Answers: 3
image
Computers and Technology, 22.06.2019 11:00, paigesyring
How does a policy manual an organization? a. it boost productivity. b. it create awareness in employees about the organization’s values. c. it employees achieve targets. d. it safeguards the organization from liabilities.
Answers: 1
image
Computers and Technology, 22.06.2019 19:00, dadonelson2109
If your accelerator suddenly gets stuck what should you do
Answers: 2
You know the right answer?
Given the following tables: • students(sid, name, age, gpa) • courses (cid, deptid, name) • professo...

Questions in other subjects:

Konu
Mathematics, 04.03.2021 14:00
Konu
Chemistry, 04.03.2021 14:00
Konu
Business, 04.03.2021 14:00