Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

By the SQL query HAFH ( Home Away from Home ) ; CreateAndLoadHAFH.sql 1 . Display all attributes for all records in the INSPECTS table,

By the SQL query HAFH (Home Away from Home); CreateAndLoadHAFH.sql 1. Display all attributes for all records in the INSPECTS table, sorted by the date of the next inspection. 2. Display the inspector ID, inspector name, building ID, and date of next inspection for all inspectors who have any inspections scheduled after April 1st,2020 of buildings with more than three floors, sorted by inspector name, building ID, and date of next inspection. 3. Display the name of the corporate client and the name of the corporate client who referred it, for every corporate client referred by a corporate client in the Music industry, sorted by the corporate client name. In the output, the column headers should be "Client Name" and "Referred By".4. Display the staff member ID and staff member name of staff members cleaning apartments rented by corporate clients whose corporate location is Chicago, sorted by staff member name. Do not display the same staff member more than once. 5. Display the first and last names, current salaries, salaries after a 20% raise, and phone numbers of each manager who resides in a building that he or she also manages whose current salary is between $50,000 and $60,000(use the keyword BETWEEN), and whose last name either begins with S or ends with T, ordered by their last name, first name, and phone number. When displaying salaries in the output, use column headers Current_Salary and New_Salary. (Note that MPhone attribute is in a table called MANAGERPHONE.)6. Display the building ID, apartment number, and employee (staffmember or inspector) name of apartments that are either cleaned by a staffmember employee whose name begins with C or are located in a building inspected by an inspector employee whose name begins with B, ordered by the employee name, building ID, and apartment number. The column header for the employee name should be Employee_Name. Use the UNION keyword in your solution. NOTE : Don't use JOIN Can you explain by solving above six question from the SQL code with out join

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

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

Practical Database Programming With Visual C# .NET

Authors: Ying Bai

1st Edition

0470467274, 978-0470467275

More Books

Students also viewed these Databases questions

Question

Evaluate the importance of the employee handbook.

Answered: 1 week ago

Question

Discuss the steps in the progressive discipline approach.

Answered: 1 week ago