Beruflich Dokumente
Kultur Dokumente
1
Class Students Class_fee Student_fee
cid Rollno cid Rollno
name cid fee Amount_paid
Name Date
Monitor
Q.2 Carefully read the case given below and answer the questions given at the end.
A retailer wants an automated system for his shop. He purchase products from different
suppliers and records supplier, name, address and phone number of each supplier. He also
records the product code, quantity purchased and cost per unit. On each sale he records product
code, sale price per unit, quantity sold and type of sale. Type of sale is either cash or credit. In
case of credit sale he records the client name, address and phone number.
1. Make tables to fulfill the above requirements [4]
2. Write sql query to show stock report [4]
Product Quantity Quantity Stock in
name purchased sold hand
3. Write sql query to show report of total revenue [3]
Total Total Profit/loss
purchases sales
4. Write sql query to show client names and his total amount receivable [3]
5. Write sql query to show total purchases from each supplier [3]
6. Write sql query to show total amount of cash and credit sales [3]
GOOD LUCK