Consider the table FLIGHT given below Write commands in SQL for (i) to (iv) and output for (v) to (vii).
TABLE: FLIGHT
FLCODE |
START |
DESTINATION |
NO_ STOPS |
NO_FLIGHTS |
IC101 |
Delhi |
Agartala |
1 |
5 |
IC102 |
Mumbai |
Sikkim |
1 |
3 |
IC103 |
Delhi |
Jaipur |
0 |
7 |
IC105 |
Kanpur |
Chennai |
2 |
2 |
IC107 |
Mumbai |
Kanpur |
0 |
4 |
IC431 |
Indore |
Chennai |
3 |
2 |
IC721 |
Delhi |
Ahmedabad |
2 |
6 |
(i) Display details of all flights starting from Delhi.
(ii) Display details of flights that have more than 4 number of flights operating.
(iii) Display flight codes, starting place, destination, number of flights in descending order of number of flights.
(iv) Display destinations along with flight codes of all the destinations starting with 'A'.
(v) SELECT MAX(NO_FLIGHTS) FROM FLIGHT
(vi) SELECT DISTINCT(NO_STOPS) FROM FLIGHT
(vii) SELECT START COUNT(.) FROM FLIGHT GROUP BY Start;