Question: 2) In SQL and RA, find the name and phone number of departments with fewer than 10 faculty and which offer courses that are more

 2) In SQL and RA, find the name and phone number

2) In SQL and RA, find the name and phone number of departments with fewer than 10 faculty and which offer courses that are more than 4 units and are either technology or computer programming (course description mentions programming, technology, computer). For each such course, retrieve its course number, title, and units.

SELECT d.name, d.phoneNumber, c.courseNumber, c.title, c.units

FROM course c INNER JOIN

(SELECT d.id, d.name, d.phoneNumber

FROM department INNER JOIN faculty f ON d.id = f.department

WHERE COUNT(f.department)

ON c.department = d.id

WHERE units >= 4 AND (description LIKE %programming% OR description LIKE %technology% OR description LIKE %computer%);

d.name, d.phoneNumber, c.courseNumber, c.title, c.units

units >= 4 ^ description = %programming% ^ description = %technology% ^ description = %computer%

(course c c.department = d.id ( d.id, d.name, d.phoneNumber,

COUNT(f.department)

(department d d.id = f.department faculty f )))

Is the above correct based on the relational model provided?

PK Requirements courserequiredCourse requirementType FK FK Courses 1.. PK CK #2 CK #3 1..1 courseNumbertitle units description department FK There are other CK's here.. not included on purpose. Try finding them for practice Classes FK courseNumber sectionNumber semester meetingDayTime locationinstructor PK FK CK #4 CK #3 0..1 Faculty PK CK #3 CK #4 department FK id firstName lastName officeLocation startDate phoneNumber CK #2 Departments CK21 CK #2 CK #3 PK name officeLocation phoneNumber numberOfFaculty college code

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!