Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create the following tables: student ( sid , sname, sex, age, year, gpa) dept ( dname , numphds) prof ( pname , dname) course (

Create the following tables:

student (sid, sname, sex, age, year, gpa)
dept (dname, numphds)
prof (pname, dname)
course (dname, cno, cname)
major (dname, sid)
section (dname, cno, sectno, pname)
enroll (sid, dname, cno, sectno, grade) 

Queries

1. Print the names of professors who work in departments that have fewer than 50 PhD students.
2. Print the names of the students with the lowest GPA.
3. For each Computer Sciences class, print the class number, section number, and the average gpa of the students enrolled in the class.
4. Print the names and section numbers of all classes with more than six students enrolled in them.
5. Print the name(s) and sid(s) of the student(s) enrolled in the most classes.
6. Print the names of departments that have one or more majors who are under 18 years old.
7. Print the names and majors of students who are taking one of the College Geometry courses.
8. For those departments that have no major taking a College Geometry course print the department name and the number of PhD students in the department.
9. Print the names of students who are taking both a Computer Sciences course and a Mathematics course.
10. Print the age difference between the oldest and the youngest Computer sciences major.
11. For each department that has one or more majors with a GPA under 1.0, print the name of the department and the average GPA of its majors.
12. Print the ids, names and GPAs of the students who are currently taking all the Civil Engineering courses.

Step by Step Solution

3.32 Rating (161 Votes )

There are 3 Steps involved in it

Step: 1

BY THE USING ABOVE DATA I Select pname from prof inner join dept on profdname deptdname where numphd... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Document Format ( 2 attachments)

PDF file Icon
636047ea84a0a_233869.pdf

180 KBs PDF File

Word file Icon
636047ea84a0a_233869.docx

120 KBs Word File

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Linear Algebra with Applications

Authors: Steven J. Leon

7th edition

131857851, 978-0131857858

More Books

Students also viewed these Accounting questions

Question

a. Can Budgeting be used in Performance evaluation

Answered: 1 week ago

Question

1. Describe how culture is like an onion.

Answered: 1 week ago