Question 1: SQL queries (20 marks) Consider the following relations: Student (snum: integer, sname: string, major: strin

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Question 1: SQL queries (20 marks) Consider the following relations: Student (snum: integer, sname: string, major: strin

Post by answerhappygod »

Question 1 Sql Queries 20 Marks Consider The Following Relations Student Snum Integer Sname String Major Strin 1
Question 1 Sql Queries 20 Marks Consider The Following Relations Student Snum Integer Sname String Major Strin 1 (46.15 KiB) Viewed 18 times
Question 1: SQL queries (20 marks) Consider the following relations: Student (snum: integer, sname: string, major: string, level: string, age: integer) Class (name: string, meets at: time, room: string, fid: integer) Enrolled (snum: integer, cname: string) Faculty (fid: integer, fname: string, deptid: integer) The meaning of these relations is straightforward; for example, Enrolled has one record per student- class pair such that the student is enrolled in the class. Write the following queries in SQL. No duplicates should be printed in any of the answers. a. Find the names of all Seniors (Level = SNR) who are enrolled in a class taught by Bill Johnson. (5 marks) b. Find the age of the oldest student who is an Engineering major. (5 marks) c. Find the names of all classes that either meet in room D610 or have twenty or more students enrolled. (5 marks) d. Find the name of the class that has the largest number of students. (5 marks)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply