Page 2 - Home Assignment-Simple Queries in SQL
P. 2

i)    To display CNo, CNAME, TRAVELDATE from the table TRAVEL in descending order
                       of CNo.

                 ii)   To  display  the  CNAME  of  all  the  customers  from  the  table  TRAVEL  who  are
                       travelling by vehicle with code V01 or V02.
                 iii)   To display the CNo and CNAMe of those customers from the table TRAVEL who
                       travelled between ‘2015-12-31’ and ‘2015-05-01’.
                 iv)   To display all the details from the table TRAVEL for the customers, who have travel
                       distance more than 120 KM in ascending order of NOP.
                 v)    To display all travel details for vehicle code V02/V03/V04 (use IN clause).
                 vi)   To display all those travel details where number of passengers are between 30
                       and 40 (use between clause).
                 vii)  To display travel details for the year 2015.

                 viii)   For each vehicle display the freight charges for 10 km.
                 ix)   Select max(perkm), min(perkm) form vehicle.
                 x)    Select Distinct VCODE from Travel;
                 xi)   Select count(*) from vehicle;
                 xii)   Select * from vehicle where name like '%A%'.
   1   2