Created
February 24, 2016 05:01
-
-
Save radityopw/c0297b06450a2c6feaf3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select * from ( | |
SELECT row_number() over(order by orderDate desc, sales.SalesOrderHeader.SalesOrderID desc) as number,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 | |
) a | |
where number between 1 and 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment