Skip to content

Instantly share code, notes, and snippets.

@anibihakeem
Created December 12, 2023 10:59
Show Gist options
  • Select an option

  • Save anibihakeem/d8d264ef8e3cd4c469e47f13192344cb to your computer and use it in GitHub Desktop.

Select an option

Save anibihakeem/d8d264ef8e3cd4c469e47f13192344cb to your computer and use it in GitHub Desktop.
USE AdventureWorks2022
SELECT ProductID, SUM(OrderQty) AS Order_Qty
FROM Sales.SalesOrderDetail
GROUP BY ProductID
ORDER BY Order_Qty DESC;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment