Home > database >  The database
The database

Time:10-04

CodePudding user response:

 -- ROW_NUMBER () OVER () 
SELECT
*, ROW_NUMBER () OVER (PARTITION BY SUBJECT ORDER BY score DESC) RN
The FROM # Table

- DENSE_RANK () OVER ()
SELECT
*, DENSE_RANK () OVER (PARTITION BY SUBJECT ORDER BY score DESC) RN
The FROM # Table

- RANK () OVER ()
SELECT
*, RANK () OVER (PARTITION BY SUBJECT ORDER BY score DESC) RN
The FROM # Table

CodePudding user response:

Under the wrong

CodePudding user response:

This is the writing in the MSSQL
  • Related