Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 2 (80 marks) Use SQL to express the following queries. You should enter your statements on Oracle VM or other SQL engine and take

image text in transcribed

Part 2 (80 marks) Use SQL to express the following queries. You should enter your statements on Oracle VM or other SQL engine and take necessary screenshot for the statement and the query result as the following screenshot and put the screenshots in your word/PDF file to be submitted. Each query is 3 mark and the result is 2 marks. If the statement and query result are not on the same screenshot, you will get 0 mark. SQL> select from boat; SQL NAME COLOR B1 Freedom B2 Paradise B3 Miracle B4 Splendor Blue Green RedResults Yellow 1. Get name of boat that "Lastname" reserves 2. Get sailer names for sailers who reserve Paradise using EXISTS 3. Get sailer names for sailers who reserve Paradise using IN 4. Get sailer names for sailers who reserve Paradise using a flat query 5. Get sailer names for sailers who do not reserve any boat. 6. Get the names of the boats that Jones reserves but "Lastname" does not reserve using MINUS 7. Get all pairs of sailer names such that the sailers concerned reserve at least one same boat 8. Get sailer names for sailers who reserve all boats 9. Get sailer names for sailers who reserve all boats except Splendor. 10. Get sailer names for sailers who reserve all boats that Lastname reserves 11. Get sailer names for sailers who reserve only the boats that Lastname reserves 12. Get sailer names and the number of boats they reserve. 13. Get sailer names for sailers who reserve more than two boats without using HAVING 14. Get sailer names for sailers who reserve more than two boats using HAVING 15. Get complete information of each sailer such that when the sailer reserves a boat, list boat detail:; when the sailer does not reserve any boat, just list the sailer information. 16. Get sailer names and the number of boats that the sailer reverses. If the sailer does not reserve any boat, leave it null. Part 2 (80 marks) Use SQL to express the following queries. You should enter your statements on Oracle VM or other SQL engine and take necessary screenshot for the statement and the query result as the following screenshot and put the screenshots in your word/PDF file to be submitted. Each query is 3 mark and the result is 2 marks. If the statement and query result are not on the same screenshot, you will get 0 mark. SQL> select from boat; SQL NAME COLOR B1 Freedom B2 Paradise B3 Miracle B4 Splendor Blue Green RedResults Yellow 1. Get name of boat that "Lastname" reserves 2. Get sailer names for sailers who reserve Paradise using EXISTS 3. Get sailer names for sailers who reserve Paradise using IN 4. Get sailer names for sailers who reserve Paradise using a flat query 5. Get sailer names for sailers who do not reserve any boat. 6. Get the names of the boats that Jones reserves but "Lastname" does not reserve using MINUS 7. Get all pairs of sailer names such that the sailers concerned reserve at least one same boat 8. Get sailer names for sailers who reserve all boats 9. Get sailer names for sailers who reserve all boats except Splendor. 10. Get sailer names for sailers who reserve all boats that Lastname reserves 11. Get sailer names for sailers who reserve only the boats that Lastname reserves 12. Get sailer names and the number of boats they reserve. 13. Get sailer names for sailers who reserve more than two boats without using HAVING 14. Get sailer names for sailers who reserve more than two boats using HAVING 15. Get complete information of each sailer such that when the sailer reserves a boat, list boat detail:; when the sailer does not reserve any boat, just list the sailer information. 16. Get sailer names and the number of boats that the sailer reverses. If the sailer does not reserve any boat, leave it null

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

More Books

Students also viewed these Databases questions

Question

14. List three reasons for documenting data in a business report.

Answered: 1 week ago