subject

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ā€™).

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 15:30
The song about casey jones a railroad engineer who gives his life on the job would most likely gall under the folk song category of? a-work song b-nonsense song c-religious song d-ballad
Answers: 1
question
Computers and Technology, 23.06.2019 20:10
Leo is a recruitment executive for a large company. he has identified new labor resource requirements in both the marketing and production departments. what should be his first step in recruiting candidates for the positions? a. conduct background checks of candidates b. make job offers c. arrange interviews d. conduct reference checks e. place job ads on job sites
Answers: 1
question
Computers and Technology, 24.06.2019 05:00
Who is most likely be your target audience if you create a slide presentation that had yellow background and purple text
Answers: 2
question
Computers and Technology, 24.06.2019 15:30
Emma is using an artificial intelligence system, which contains information on botany, to identify a type of plant from an image. what type of ai is emma using?
Answers: 1
You know the right answer?
Consider the following relational schema, where the primary keys are Bold,
Students(sid, snam...
Questions
question
Biology, 27.08.2019 13:50
question
English, 27.08.2019 13:50
question
Mathematics, 27.08.2019 13:50
question
History, 27.08.2019 13:50