Skip to content

Instantly share code, notes, and snippets.

@radityopw
Created February 24, 2016 04:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save radityopw/4fe171106a851586ca1a to your computer and use it in GitHub Desktop.
Save radityopw/4fe171106a851586ca1a to your computer and use it in GitHub Desktop.
SELECT Sales.SalesOrderHeader.SalesOrderID, Sales.SalesOrderHeader.OrderDate, Production.Product.ProductNumber, Production.Product.Name,
Sales.SalesOrderDetail.UnitPrice, Sales.SalesOrderDetail.OrderQty, Sales.SalesOrderDetail.UnitPriceDiscount, Sales.SalesOrderDetail.LineTotal
FROM Sales.SalesOrderHeader INNER JOIN
Sales.SalesOrderDetail ON Sales.SalesOrderHeader.SalesOrderID = Sales.SalesOrderDetail.SalesOrderID INNER JOIN
Production.Product ON Sales.SalesOrderDetail.ProductID = Production.Product.ProductID
order by orderDate desc, SalesOrderID desc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment