You are on page 1of 2

1.

create above tables

2. insert above data into 3 tables

3. list all sailors names with age

4. list all sailors names without duplicate values.

5. Find all information of sailors who have reserved boat number 103

6. Find the names of sailors who have reserved a red boat, and list in the order of age.

7. Find the names of sailors who have reserved at least one boat

8. Find the ids of sailors who have reserved a red boat or a green boat.

9. Find the names of sailors who have reserved boat 103 using sub queries.

10. Find the name and the age of the youngest sailor (use operator ALL )

11. Find the names and ratings of sailor whose rating is better than some sailor called Horatio.

12. Count the number of different sailor names

13. Calculate the average age of all sailors

14. Find the name and the age of the youngest sailor(use min function)

15. Find the average age of sailors for each rating level
16. Find the average age of sailors for each rating level that has at least two sailors

17. Find the colors of boats reserved by Andy

18. Find all sailor id’s of sailors who have a rating of at least 8 or reserved boat 103.

19. Find the names of sailors who have not reserved a boat whose name contains the string
“us”. Order the names in ascending order.

20. Find the sailor id’s of sailors with age over 20 who have not reserved a boat whose name

includes the string “pper”.

21. Find the names of sailors who have reserved at least two boats.

22. Find the sids of sailors with age over 20 and who have reserved a red boat

23. Find the sid’s , names of sailors who have reserved all boats and having age greater than 30.

24. Find sailors whose rating is better than every sailor called “Horatio"

25. Find the sailor id’s of sailors with the highest rating

You might also like