Assignment Detail

Tutors

Write and execute a query that will return the name

    Assignment Instructions

    Assignment ID: FG133288765

    Database Management Systems

    Advanced Structured Query Language

    Question 1. Write and execute a query that will return the name and age of all customers.You should have 7 rows in your result:

    Question 2. Write and execute a query that will display the name and resid_city of all customers that were born in Tampa.

    Question 3. Write and execute a query that will show the customer id and name of customers between the ages of 25 (inclusive) and 40 (inclusive). Order your results by Cname in descending order. Display the CName column with the heading “Customer Name” ← note the capitalizing and the space between words. (Note that you will need to use a column alias for this using the keyword “AS.”)

    Question 4. Write and execute a query that will list any customers whose names begin with the letter “G”.

    Question 5. Write and execute a query that will display a unique list of all the automobile Makes that have ever been rented. Order your results by Make.

    Question 6. Write and execute a query that will display all of the customers who have ever rented an automobile. Include the customer name, make, pickup location in your results. Order your list in ascending order by pickup.
    Your results should include 8 rows:

    Question 7. Write and execute a query that will return the names of customers who rented a Ford or GM.
    You should have 4 rows in your resultset.

    Question 8. Write and execute a query that will display the customer names, ages, makes, and daily cost of each automobile that they rented. Order your results by cost.
    You should have 8 rows in your

    Question 9. Write and execute a query that will return the unique list of birth places of everyone who has ever rented a Ford.
    You should have one row in your result: Tampa

    Question 10. Write a query that will return the Names and ages of customers who have rented any automobile during 2009. Make sure that each customer is listed only once in your output.
    You should have two rows in your resultset:

    Question 11. Write and execute a query that will determine the total number of days that Black rented a GM on November 1, 2009.
    You should have one cell: 4

    Question 12. Write and execute a query that will determine the total cost of the automobile rented by Black on November 1, 2009.
    You should have one cell: 160

    Question 13. Write and execute a query that will determine the Total cost of all the automobiles that have ever been rented.
    You should have one cell: 1880

    Question 14. Write and execute a query that will determine the average number of days that automobiles are rented. Show your result broken out by makes. Do not include an automobile if it has not yet been returned.
    You should have two rows: Ford and GM with average days rented 13 and 4, respectively.

    Question 15. Write and execute a query that will determine the average age of customers broken out by the city in which they reside. Note: Make sure that the average age is not truncated to an integer.
    You should have 4 rows: Cary, Denver, Erie, and Hemet with average ages of 42.5, 25, 31, and 32.5

    Question 16. Write and execute a query that will show a list of customers who reside in the same city in which they were born.
    You should have 2 rows: Simon and Vernon

    Question 17. Using a left outer join, write and execute a query that will display a unique list of the makes of automobiles that have never been rented.
    You should have 2 rows: Toyota and Volvo

    Question 18. Using a Type I query, display a unique list of the makes of automobiles that have never been rented.
    You should have 2 rows: Toyota and Volvo

    Question 19. Using a right outer join, write and execute a query that will display a unique list of customers who have never rented an automobile.
    You should have two rows: Vernon and Wilson

    Question 20. Using a Type II query, display a unique list of customers who have never rented an automobile.
    You should have two rows: Vernon and Wilson

    Question 21. Write and execute a query that will display a list of the customers who picked up their rental from the same city in which they reside.
    You should have 2 rows: Black and Simon

    Question 22. Write a query that will display a list of customers who have not returned their rentals.
    You should have 2 rows: Green and Simon

    Question 23. Using a Type I query, show all of the names and ages of customers who have rented an automobile and returned it to Erie. Sort your results in ascending order by customer name.
    You should have three rows: Black, Jones, Martin.

    Question 24. Using a Type II query, show all of the customers who rented an automobile and picked it up in Cary.
    You should have three rows: Black, Jones, and Martin

    Question 25. Write and execute a single query that will display all of the information in the Customer, Rentals, and Rentcost tables in a single resultset.Be sure to display each field only once in your output. Order your results in ascending order by Customer.CID and Rentcost.Make .
    You should have 12 rows and 12 columns in your result.

    Attachment:- Advanced Structured Query Language Queries Template.rar

    Need fresh solution to this Assignment without plagiarism?? Get Quote Now

    Expert Answer

    Asked by: Anonymous
    Plagiarism Checked
    Answer Rating:
    4.6/5

    Plagiarism free Answer files are strictly restricted for download to the student who originally posted this question.

    Related Assignments

    //
    Our customer support team is here to answer your questions. You can send Assignments directly to support team.
    👋 Hi, how can I help?