Professional Documents
Culture Documents
Experiment On Having Group by Clause
Experiment On Having Group by Clause
SURESH SUPE
CLASS: SE COMPUTER
BATCH: D
SUBJECT: DBMS EXP.7
Practice work
| P07975 | 2|
+------------+----------+
7 rows in set (1.66 sec
mysql> select product_no, SUM(qty_ordered) AS QUantity FROM sales_order_details GROUP
BY product_no;
+------------+----------+
| product_no | QUantity |
+------------+----------+
| P00001 | 34 |
| P03453 | 6|
| P06734 | 1|
| P07868 | 3|
| P07885 | 5|
| P07965 | 3|
| P07975 | 6|
+------------+----------+
7 rows in set (0.00 sec)
Output
Output
Query Calculate the average qty sold for each client that has a maximum order value
of 15000.00
Output
Query Find out the sum total of all the billed orders for the month of January.
Output
Conclution I understood the concept of group by clause which is used to group rows by
column name & having clause which is used to check conditions involving
aggregate functions. I also learnt implementation of group by clause &
having clause.