Question

Use SQL to slove the problem

1. (7) List all condos in building C, the date they were cleaned, and the full name of the staff who cleaned them in August.

2. (5) Display the activities reserved in June for more than 3 people. Include the activity description and label the output as Activities Reserved in June.

3. (4) Listing for all guides and their certification renewal dates for next year. Include full name and hire date.

4. (6) Management needs the names of all guides who lead an activity with an expired certificate. Display the guide's full name, the certificate renewal date, and the date and description of the ‘activity’.

5. (8) We need the date and full names of all girls (children) who went horseback riding this year. List by family name within date.

6. (4) How many rafting trips were taken this year? Label the output, Rafting Trips.

7. (9) List the first and last names and ages of all children who are 7, 10, and 13 years of age. Include the building and unit number of the condo in which they are staying the week of July 29th. Display oldest children first.

8. (7) Management needs a listing of all 3-bed, 2-bath units at the resort that were occupied July 1ST week. Include building, condo, and unit number. Order by unit number within each building.

9. (4) What is the most number of days, the least number of days, and the average number of days our employees have been with the resort? Label all columns Most Days Employed, Least Days Employed and Average Days Employed.

10. (4) For each manager, list their last name (Manager) and hiredate and the last names and hiredates of all employees (Employee) working under them. List by the manager's last name.

11. (4) Management wants a list of first and last names of all employees and the number of months they've been with the company (Months Employed). List the newest employees first.

12. (3) What is the average total cost of all reservations this year? Show the cost in 2 decimal places. Label the output, Average Total Cost in 2017.

13. (3) What were the total revenues for activities this year? Display the output as, Total Activity Revenues.

14. (3) The guests in condo A105 want to reserve an activity but lost the activities brochure that was provided in their condo. They remembered that Eagle was in the description, but cannot recall anything else. List the information for all specified activities for the guests so that they can make their plans.

15. (5) One of our guests left their tablet in condo 6 on June 10th (checkout). We need to call and get the address so that it can be returned. Look up the full name, spouse's name, and phone number. Maybe we can catch them before they leave the area.

16. (4) Which employees have guided reservations for more than 4 people? Include the guide's full name.

17. (11) For each activity completed in June, display the name of the activity (Activity), the guide's last name (Guide), the guest's last name (Guest), and the building and unit number where the guest stayed. List by activity.

18. (9) Some condo fees are increasing. All 3-bed, 2-bath condos have increased 8% in the price of the weekly stay. Make the changes in the database first, and then show the price increase of those condos affected by this price increase. (Use one screenshot only)

THIS IS THE REALATIONSHIP TABLE

PERSONNEL PID LName, FName, Phone, HireDate, Mgr#, PType) Ptype: housekeeping or activity guide Mgr#-employees manager number AssignedCondos: the condo numbers that have been assigned for cleaning. HOUSEKEEPING (HKID AssignedCondos) CLEANING (Condo#, DateCleaned, HKID) Bdrms-number of bedrooms in unit Baths- number of baths in unit CONDOS (Condo#, Bldg#, UnitNum, SqrFt, Bdrms, Baths, weeklyFee) StartDate - arrival CON DOSTAYS (Condo, Guest, StartDate, EndDate) EndDate departure FAMILIES (Guest FName, Relationship, Birthdate) Guests children: Relationship: son/daughter

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Note: In the below answer, The Current_date() , year(), Month() function would be varyng based on different RDBMS.

1. List all condos in building C, the date they were cleaned, and the full name of the staff who cleaned them in August.
Solution:
SELECT CONDOS.Condo#,CLEANING.DateCleaned,
CONCAT(PERSONNEL.FNAME,PERSONNEL.LName) AS FullName
INNER JOIN CLEANING ON CONDOS.Condo#=CLEANING.Condo#
INNER JOIN CLEANING.HKID = PERSONNEL.PID
WHERE CONDOS.Bldg# = 'C' AND Month(CLEANING.DateCleaned)='August';

3. Listing for all guides and their certification renewal dates for next year. Include full name and hire date.

SELECT GUIDES.CertDate,CONCAT(PERSONNEL.FNAME,PERSONNEL.LName) AS FullName,
GUIDES.CertRenewDate,PERSONNEL.HireDate FROM GUIDES INNER JOIN
PERSONNEL.PID = GUIDES.GID
WHERE Year(CertRenewDate)=Year(CURRENT_DATE)+1

6. How many rafting trips were taken this year? Label the output, Rafting Trips.
Rafting Trips were not mentioned in any table attributes.
-- need more infor for this question. Which tables contains the attribute or value ' Rafting Trips'

Add a comment
Know the answer?
Add Answer to:
Use SQL to slove the problem 1. (7) List all condos in building C, the date...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Use the HR database for all the questions in this lab. For each item in this lab, paste the SQL y...

    Use the HR database for all the questions in this lab. For each item in this lab, paste the SQL you used to complete the task and the number of rows retrieved. Ensure you follow the coding standards listed in the ETSU SQL standards guide found on D2L. Save this document as a PDF and name it your_name_lab7.pdf Display the employees’ first name, last name and phone number of employees with salaries greater than 10,000 dollars. SELECT first_name, last_name, phone_number,...

  • 1,List the first and last name of the donators that donated in December 2009. 2. List...

    1,List the first and last name of the donators that donated in December 2009. 2. List the ID's of the volunteers that have not worked. 3. List the ID, first name, and last name of any employees who works in the Finance department. 4. List all the different prices suppliers have for 'Tasty Meat' product. 5. Select the store ID and store phone number for all stores in 'St.Paul'. 6. List the member first and last name, address, city, zip...

  • can someone solve these quick please and thank you! sql chapter 4 Query #1: List the...

    can someone solve these quick please and thank you! sql chapter 4 Query #1: List the company name, contact name, contact title and the phone number for customers who HAVE NOT put in an order. Use an outer join. Query #2: Create a listing displaying the employee first name, last name and the full name (First name space Last Name) of the person they report to (Supervisor). This is a self-join. If an employee does not report to anyone then...

  • SQL Homework 1. For each reservation, list the reservation ID, trip ID, customer number, and customer...

    SQL Homework 1. For each reservation, list the reservation ID, trip ID, customer number, and customer last name. Order the results by customer last name. 2. For each reservation for customer Ryan Goff, list the reservation ID, trip ID, and number of persons. 3. List the trip name of each trip that has Miles Abrams as a guide. 4. List the trip name of each trip that has the type Biking and that has Rita Boyers as a guide. 5....

  • Use only a single SQL statement for each of the following questions 1 Give a listing of all the ssns,first names and the class descriptions of all the classes the students are taking. If there a...

    Use only a single SQL statement for each of the following questions 1 Give a listing of all the ssns,first names and the class descriptions of all the classes the students are taking. If there are no class _descriptions display 'No description is available yet'. (USE NVL) 2 Give a listing of only the lname and the class_code for students who are taking 'Introduction to C programming'. (Inner join) 3 Give a lising of all the class_descriptions and the number...

  • Use program control statements in the following exercises: Question 1 . Write pseudocode for the following:...

    Use program control statements in the following exercises: Question 1 . Write pseudocode for the following: • Input a time in seconds. • Convert this time to hours, minutes, and seconds and print the result as shown in the following example: 2 300 seconds converts to 0 hours, 38 minutes, 20 seconds. Question 2. The voting for a company chairperson is recorded by entering the numbers 1 to 5 at the keyboard, depending on which of the five candidates secured...

  • Please use the above info to answer the next problems B C D 1 Due to...

    Please use the above info to answer the next problems B C D 1 Due to its popularity, the Black and White Handbag (BW14293) is normally a stock item. However, the 2 handbag is currently out of stock. Rather than producing only enough units to fill Katie's order, 3 management would like to produce a job (Job 114) that is large enough to fill Katie's order and replenish 4 stock. The fabric used for this job can be stacked four...

  • New Perspectives on HTML5 and CSS3. Solve Chapter 13 Case Problem 3. mas_register.js "use strict"; /*...

    New Perspectives on HTML5 and CSS3. Solve Chapter 13 Case Problem 3. mas_register.js "use strict"; /* New Perspectives on HTML5, CSS3, and JavaScript 6th Edition Tutorial 13 Case Problem 3 Filename: mas_register.js Author: Date: Function List ============= formTest() Performs a validation test on the selection of the conference session package and the conference discount number calcCart() Calculates the cost of the registration and saves data in session storage    writeSessionValues() Writes data values from session storage in to the registration...

  • Super stuck on a couple of questions on this scenario. Advanced Scenario 7: Mark and Barbara...

    Super stuck on a couple of questions on this scenario. Advanced Scenario 7: Mark and Barbara Matthews Directions Using the tax software, complete the tax retum, including Form 1040 and all appropri- ate forms, schedules, or worksheets. Answer the questions following the scenario. Note: When entering Social Security numbers (SSNS) or Employer identification Numbers (EINS), replace the Xs as directed, or with any four digits of your choice. Interview Notes • Mark and Barbara are married and want to file...

  • I need help with this assignment in C++, please! *** The instructions and programming style detai...

    I need help with this assignment in C++, please! *** The instructions and programming style details are crucial for this assignment! Goal: Your assignment is to write a C+ program to read in a list of phone call records from a file, and output them in a more user-friendly format to the standard output (cout). In so doing, you will practice using the ifstream class, I'O manipulators, and the string class. File format: Here is an example of a file...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT