Run Code  | API  | Code Wall  | Users  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

Window Functions - ROW_NUMBER()

Language: Layout:
View schema
Execution time: 0,02 sec, rows selected: 25, rows affected: 8, absolute service time: 0,19 sec, absolute service time: 0,19 sec 
edit mode |  history  | discussion
   sql server version
1 Microsoft SQL Server 2014 - 12.0.2000.8 (Intel X86) Feb 20 2014 19:20:46 Copyright (c) Microsoft Corporation Express Edition on Windows NT 6.3 <X64> (Build 9600: ) (WOW64) (Hypervisor)
   ProductID ProductName ProductCategory ProductPrice
1 1 iPhone X Technology 1200
2 2 Nike Vapor Shoes Apperral 180
3 3 Ford Focus Automobile 18500
4 4 Nissan Altima Automobile 18500
5 5 Astros Cap Apparrel 80
6 6 Barcelona Jersey Apparrel 90
7 7 Samsung Galaxy Technology 850
8 8 Apple Watch Technology 320
   ProductName ProductCategory ProductPrice PriceRank
1 Ford Focus Automobile 18500 1
2 Nissan Altima Automobile 18500 2
3 iPhone X Technology 1200 3
4 Samsung Galaxy Technology 850 4
5 Apple Watch Technology 320 5
6 Nike Vapor Shoes Apperral 180 6
7 Barcelona Jersey Apparrel 90 7
8 Astros Cap Apparrel 80 8
   ProductName ProductCategory ProductPrice PriceRank
1 Barcelona Jersey Apparrel 90 1
2 Astros Cap Apparrel 80 2
3 Nike Vapor Shoes Apperral 180 1
4 Ford Focus Automobile 18500 1
5 Nissan Altima Automobile 18500 2
6 iPhone X Technology 1200 1
7 Samsung Galaxy Technology 850 2
8 Apple Watch Technology 320 3