Question: Study the database shown below and write SQL statements that accomplish the tasks follow. You do not need to use SQL assistant for this question.

Study the database shown below and write SQL statements that accomplish the tasks follow. You do not need to use SQL assistant for this question. Simply use a plain text editor, such as Notepad, and submit a file with '.txt' extension.

Study the database shown below and write SQL

SQL1: Display the CCID, CCName, and CCIndustry for all corporate clients.

SQL2: Display the BuildingID, BNoOfFloors, and the managers MFName and MLName for all buildings.

SQL3: Display the BuildingID and AptNo, for all apartments leased by the corporate client WindyCT.

SQL4: Display the MFName, MLName, MSalary, MBDate of managers, and number of buildings that the manager manages, for all managers with a salary less than $55,000.

SQL5: Display the managerid, MFName, and MLName for the manager with the lowest salary.

SQL6: Display the BuildingID of the buildings where an above average number of inspections are performed. For example, if the average number of inspections per building is 'x', then you need to display the IDs of the buildings where more than 'x' inspections are performed.

INSPECTOR InsID InsName INSPECTING InsID (FK) Building ID (FK) DateLast DateNext MANAGER Manager ID MFname Miname MBDate MSalary MBonus (0) MResBuildingID (FK) BUILDING BuildingID BNoOfFloors ManagerID (FK) APARTMENT AptNo Building ID (FK) ANoOfBedrooms CCID (O)(FK) CLEANING AptNo (FK) BuildingID SMemberID (FK) MANAGERPHONE MPhone Manager ID (FK) CORPCLIENT CCID CCName (0) CCIndustry CCLocation CCIDReferredBy (O)(FK) STAFFMEMBER SMemberID SMemberName

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 General Management Questions!