4. List staff (branch number where the staff works for and first and last name of the staff) who manages 27 or more properties for rent with branch location (city name) and number of properties managed. Order your results in descending order of number of properties managed. Otherwise, zero point.
5. Produce a summary report that shows the numbers of managers, secretaries, supervisors and assistants for each branch, respectively. Arrange your result in two-dimensional table, where positions are column wise factor and branch numbers are row wise factor. Otherwise, zero point.
6. List first name, last name, phone number and number of properties owned for those owners who own 5 or more properties for rent. Order your results in descending order of properties owned, then by last name in ascending order. Otherwise, zero point.
7. For branch B002, list staff (staff number, first name, last name and position) whose salary is greater than the average salary over all staff and all branches, and show how much their salary is greater than the average. Order your results by the descending order of salary difference. Otherwise, zero point.
8. List the details (client鈥檚 first name, last name, phone number and date viewed) of all viewings on property PH0508 where a comment has not been supplied. Order your results by viewing date. Otherwise, zero point.
9. List all cities (city name and zip code) where there is at least one property for rent managed by staff who work in the branch office at 鈥?63 Main St鈥? Order your result by ascending order of city name. Otherwise, zero point.
10. What are top 5 popular first names (over all staff, clients and owners) and their occurrences in DreamHome database? Note: Michael, MICHAEL and michael are all same, However, it is different from Mike, MIKE or mike
Branch (bNo, street, zipcode)
Staff (sNo, fName, lName, position, sex, dob, salary, bNo)
Property (pNo, street, zipcode, type, room, rent, oNo, sNo, bNo)
Owner (oNo, fName, fName, street, zipcode, phone)
Client (cNo, fName, lName, phone, prefType, maxRent)
Viewing (pNo, cNo, viewDate, cmmt)
Zip (city, state, zipcode)Help with SQL database questions.?
I can answer all your questions. Do you want the answers to be pasted here?
No comments:
Post a Comment