Computers and Technology

Consider the following relational schema, where the primary keys are Bold,
Students(sid, sname, address, dept_id)
Courses(cid, cname, dept_id)
Departments(dept_id, dname, college)
Grades(sid, cid, year, semester, grade)
Write the following queries in SQL. Only use the tables that are absolutely needed for the corresponding query.
1. Find the sids and snames of students who took "Database" course (i. e., cname = ‘Database’) in Fall 2019.
2. Find the average grade of all the students who took "CS327" (i. e., cid=‘CS327’) in Fall 2019. You can assume grade is a numerical attribute.
3. Find the number of distinct courses offered by each department in Fall 2019.
4. Find the sids of students who have taken at least 10 different courses offered by "Computer Science" department (i. e., dname = ‘Computer Science’).

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 20:30, summerhumphries3
What are some settings you can control when formatting columns?
Answers: 1
image
Computers and Technology, 23.06.2019 22:20, andrew412603
Learning sign language is an example of a(n) learning sign language is an example of a(n)
Answers: 2
image
Computers and Technology, 24.06.2019 15:30, sonyfan
What is the total number of time zones that can be configured to show by default in a calendar in outlook 2016?
Answers: 1
image
Computers and Technology, 24.06.2019 15:50, GreatBaconGamer
Subscribe to j p g a m e t u b e on you tube ?
Answers: 2
Do you know the correct answer?
Consider the following relational schema, where the primary keys are Bold,
Students(sid, snam...

Questions in other subjects:

Konu
English, 19.07.2020 01:01
Konu
Physics, 19.07.2020 01:01