Professional Documents
Culture Documents
BATCH.NO-4
mysql>
+-------+---------+----------+------------+
| S_id | S_type | S_amount | S_date |
+-------+---------+----------+------------+
| 10001 | T-shirt | 20000 | 2023-02-25 |
| 10002 | Shirt | 25000 | 2023-02-24 |
| 10003 | Vest | 10000 | 2023-02-13 |
| 10004 | Shirt | 20000 | 2023-02-15 |
| 10005 | Shirt | 19000 | 2023-02-01 |
| 10006 | jeans | 12000 | 2023-02-12 |
| 10007 | Shirt | 20000 | 2023-03-15 |
| 10008 | Shirt | 19000 | 2023-03-01 |
| 10009 | jeans | 12000 | 2023-03-12 |
| 10010 | Hoodies | 20000 | 2023-03-20 |
| 10011 | Top | 19000 | 2023-03-22 |
| 10012 | trouser | 12000 | 2023-03-23 |
| 10013 | Hoodies | 10000 | 2023-04-09 |
| 10014 | Top | 19000 | 2023-04-16 |
| 10015 | trouser | 22000 | 2023-04-18 |
+-------+---------+----------+------------+
15 rows in set (0.00 sec)
2)Find the highest payment amount made using each payment method
mysql> select P_type, MAX(P_amount) AS highest_payment_amount
-> FROM Payment
-> GROUP BY P_type;
+---------------+------------------------+
| P_type | highest_payment_amount |
+---------------+------------------------+
| cash | 30000 |
| bank transfer | 64000 |
+---------------+------------------------+
2 rows in set (0.00 sec)