Professional Documents
Culture Documents
MS4 1
MS4 1
Create the table VEHICLE and TRAVEL then execute the following QUERY.
Table : VEHICLE
CODE VTYPE PERKM
101 VOLVO BUS 160
102 AC DELUXE BUS 150
103 ORDINARY BUS 90
105 SUV 40
104 CAR 20
Table : TRAVEL
(a) To display NO, NAME, TDATE from the table TRAVEL in descending
order of NO.
(c) To display the Vehicle name for those Vehicle which can travel more than
180 KM.
(e) Display the count of Code for those vehicle whose Code count greater than 1.
SELECT COUNT(CODE),VTYPE FROM VEHICLE,TRAVEL WHERE
VEHICLE.CODE=TRAVEL.CODE GROUP BY TRAVEL.CODE HAVING
COUNT(CODE)>1;
(f) Display the name of passenger whose name is starting with “J” with their
vehicle type.
SELECT T.NAME,V.VTYPE FROM VEHICLE V,TRAVEL T WHERE
V.CODE=T.CODE WHERE T.NAME LIKE “J%”;