Instagram
youtube
Facebook
Twitter

Find the Maximum Quantity Sold in Any Order

Find the Maximum Quantity Sold in Any Order
OrderDetails Table:

Query Explanation:

  • MAX(Quantity) is an aggregate function that returns the highest value in the Quantity column of the OrderDetails table.

  • AS MaxQuantitySold gives the output column a meaningful alias.

  • This query checks all the order details and tells you which single item in any order had the highest quantity sold.

SQL Query:

SELECT MAX(Quantity) AS MaxQuantitySold
FROM OrderDetails;

Output: