Answered step by step
Verified Expert Solution
Question
1 Approved Answer
do it clearly .do not copy from Google else I will report . 01/03/2019 Lab Assignment-5 (DBMS) Omar the camparison operator and nested oueries Sailor
do it clearly .do not copy from Google else I will report .
01/03/2019 Lab Assignment-5 (DBMS) Omar the camparison operator and nested oueries Sailor (Sid. Sname, Rating. Age), Reserve (Sid. Bid, Date), Boat (Bid. Ename, color) 1. Find the sailors whose ratings are better than "Mark" (sailor). 2. Find the sailor with highest ratings 3. Find the sailor with lowest ratings 4. Find the details of boat whose color is not "red". (use) 5. Find the details of boat whose name is not "Titanic". (use !=) 6. Find the details of sailors whose names are "Mark", "Andrew". "Smith". (use IN) 7. Find the details of boats whose colors are "red", "blue", "black". (use =ANY) 8. Find the Sid of sailors who are not reserved on 2018-12-01", "2019-02-11", "2017-12-19". (use NOT IN) 9. Find the Bid of boats which are not reserved between 2018/04/19" and "2019/12/01". (use BETWEEN) 10. Find the sailor names whose ratings are in between 7 to 10. 11. Find the sailor names whose ages are not in between 25 to 40. (use NOT BETWEEN) 12. Find the name of the sailors whose names starts with "M" (use LIKE %) 13. Find the name of the boats whose names contains the letter "T(use LIKE %) 14. Find the name of the sailors whose names are having 5 letters and also end with "K" (use LIKE) 15. Find the name of the boats whose names do not contain the letter "T" (use NOT LIKE %) 16. Find all the sailor details where at least one sailor has been reserved. (use EXISTS) 17. Find the names of the sailors who have reserved all "red" boats but not "black" ones. (use NOT IN) 18. Find the names of the sailors who have reserved all boats. (use NOT EXISTS) Syntax for commands: Operations: [ > > > ANY select column_name from tablel where column > ANY (select sl.column from tablel where si.column=condition) > ALL select columname from tablel where column >=ALL (select sl.column from tablel where si.column condition LIKE: select column_ame from table where column LIKE "A%S": ("A%AA_ A) IN: select column name from table where column_name IN (Values/subquery) BETWEEN: select column_name from table where column_name BETWEEN value AND value2Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started