Search
 
SCRIPT & CODE EXAMPLE
 

SQL

ranking functions in sql

ROW_NUMBER() -- 1,2,3,4,5 (different rank no. to same value)
RANK() --  1,2,2,4,5 (same rank no. to same value but next rank is skipped)
DENSE_RANK() --  1,2,2,3,4 (same rank no. to same value but no skip in rank no.)

RANKING FUNCTION NAME() OVER([PARTITION BY <COLUMN NAME>] ORDER BY
<COLUMN NAME> [ASC / DESC])
-- PARTITION BY ------> OPTIONAL (ON GROUP OF ROWS).
-- ORDER BY -------> MANADATORY CLAUSE.
Comment

PREVIOUS NEXT
Code Example
Sql :: sql double quotes in string 
Sql :: merge in sql 
Sql :: timestamp type in sql 
Sql :: select sql 
Sql :: what is between operator 
Sql :: sql select distinct 
Sql :: SQL Greater Than Operator 
Sql :: sql server enterprise 
Sql :: mysql view 
Sql :: postgresql cast string to int 
Sql :: order by in sql 
Sql :: delete from where sql 
Sql :: are both the inserted and deleted tables used in update trigger 
Sql :: make a socket server to detect changes in mysql 
Sql :: mysql create link between tablesdatabase 
Sql :: modularity meaning in plsql 
Sql :: show blank in column if condition not matches in join mysql 
Sql :: reorder primary key sql 
Sql :: select all fron table 
Sql :: get the previous column of a table in mysql 
Sql :: how to see table associated with a schema in sql 
Sql :: mysql zerofill 
Sql :: multiple like values for single column postgres 
Sql :: query to fetch 50% records from the table. 
Sql :: prodection ready postgres database step by step 
Sql :: postgres create table like another table 
Sql :: Second Step in installing SQL workbench 
Sql :: md5 encryption for existing records 
Sql :: procedure excute monthly oracle 
Sql :: mysql select where field is a value 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =