亿华智慧云亿华智慧云

SQL中的分析函数

SQL中的分析函数
复制view sourceprint?析函01 USE AdventureWorks;     02 GO     03 SELECT c.FirstName, c.LastName     04     ,ROW_NUMBER() OVER(ORDER BY SalesYTD DESC) AS Row Number    05     ,s.SalesYTD, a.PostalCode     06 FROM Sales.SalesPerson s      07     INNER JOIN Person.Contact c      08         ON s.SalesPersonID = c.ContactID     09     INNER JOIN Person.Address a      10         ON a.AddressID = c.ContactID     11 WHERE TerritoryID IS NOT NULL     12     AND SalesYTD <> 0;     13 GO    1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.26.27.
赞(352)
未经允许不得转载:>亿华智慧云 » SQL中的分析函数