Professional Documents
Culture Documents
Review 2
Review 2
5. Update the TOTAL in PURCHASE_DTLS with the calculated amount from the previous
query.
6. Display month wise Total purchase from PURCHASE_DTLS
7. Display Item_ID and No. of times purchased from PURCHASE_LINE_DTLS only for the
items which are purchased at least twice.
8. Display Supplier name and No. of character in their names.
9. Create a view with the below columns:
ITEM_ID, ITEM_DESCRIPTION, OPENING_BALANCE, TOTAL_PURCHASE,
CURRENT_STOCK
TOTAL_PURCHASE : SUM(qty) from PURHCASE_LINE_DTLS for an item
CURRENT_STOCK = OPENING_BALANCE+TOTAL+PURCHASE
10. Explain the difference between the two statements given below (explain in detail)
a. SELECT empno, name, sal FROM emp1
UNION
SELECT empno, name, sal FROM emp2;