SQL Interview Questions in Telugu: Ranking Functions (RANK, DENSE_RANK)
#sql #excel #sqlserver #mssql
SQL Interview Questions in Telugu: Ranking Functions (RANK, DENSE_RANK) by Srinivas Reddy Excel Telugu Videos.
Ranking Functions:
===============
* Row_Number
* RANK
* DENSE_RANK
Syntax:
SELECT Column,
RankFunctionName( )
OVER (ORDER BY COLUMN ASC/DESC)
As Alias
From TableName
Example:
SELECT ACID, NAME, CBAL,
Rank() OVER (ORDER BY cbal DESC) as RnkNo,
Dense_Rank() OVER (ORDER BY cbal DESC) as D_RnkNo
From MasterTable
Please Follow us on Instagram: https://www.instagram.com/srinivasexcelmap/
Comments are closed.