Write SQL commands for the queries (i) to (iv) and output for (v) to (viii) based on the tables Watches’ and Sale given below.
1. TO DISPLAY ALL THE DETAILS OF THOSE WATCHES WHOSE NAME ENDS WITH ‘TIME’
2. TO DISPLAY WATCH’S NAME AND PRICE OF THOSE WATCHES WHICH HAVE PRICE RANGE IN BE-TWEEN 5000-15000.
3. TO DISPLAY TOTAL QUANTITY IN STORE OF UNISEX TYPE WATCHES.
4. TO DISPLAY WATCH NAME AND THEIR QUANTITY SOLD IN FIRST QUARTER;
5. SELECT MAX (PRICE), MIN(QTY_STORE) FROM WATCHES;
6. SELECT QUARTER, SUM(QTY SOLD) FROM SALE GROUP BY QUARTER;
7. SELECT WATCH_NAME, PRICE, TYPE FROM WATCHES W, SALE S WHERE W.
WATCH1D!=S.WATCHID; (viii) SELECT WATCH_NAME, QTYSTORE, SUM
(QTY_SOLD), QTY_STORESUM (QTYSOLD) “STOCK” FROM WATCHES W,
SALE S WHERE W. WATCHID = S.WATCHID GROUP BY S.WATCHID;