I have following query:
SELECT p.product_name, SUM(o.quantity) no_of_product_sale
2 FROM Order_Address_Quantity o
3 JOIN Product p ON p.product_code = o.product_id
4 GROUP BY p.product_name;
which results in:
PRODUCT_NAME NO_OF_PRODUCT_SALE
------------------------------ ------------------
Coffee 10
Noodles 4
Oil 8
Rice 5
Dishwasher 3
Biscuits 2
6 rows selected.
How can I show the product with maximum no_of_product_sale? In other SQLs it can be done by adding LIMIT = 1 clause.