Search
 
SCRIPT & CODE EXAMPLE
 

SQL

how to get nth number in sql

Here is the solution for nth highest
salary from employees table 

SELECT FIRST_NAME , SALARY FROM 
(SELECT FIRST_NAME, SALARY, DENSE_RANK() OVER
(ORDER BY SALARY DESC) AS SALARY_RANK
FROM EMPLOYEES)
WHERE SALARY_RANK = n; 
Comment

PREVIOUS NEXT
Code Example
Sql :: move files from one folder to another in sql server 
Sql :: sql search all tables for attributes 
Sql :: sql restore database from backup 
Sql :: increment id in mysql 
Sql :: delete from table sql 
Sql :: linux bash run sql command 
Sql :: group by por mes sql mysql 
Sql :: mysql limit order by 
Sql :: set mysql password 
Sql :: sql union operator 
Sql :: new uniqueidentifier in sql 
Sql :: json_remove mysql 
Sql :: remove root password mysql 
Sql :: how to find top 3 salary in sql 
Sql :: mysql get only the field names in a table 
Sql :: decimal() mysql 
Sql :: query to find third highest salary 
Sql :: mysql mediumtext 
Sql :: java sql insert return id 
Sql :: SQL Server OPENJSON FROM table column 
Sql :: python connect microsoft sql server 
Sql :: postgres full text search example 
Sql :: mysql extract day from date leading zero 
Sql :: sqlite clear shell 
Sql :: where clause for clob in oracle 
Sql :: union syntax in oracle 
Sql :: oracle uptime 
Sql :: sqlite löschen einer tabelle 
Sql :: sqlalchemy query sql compiled 
Sql :: triggers in mysql example 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =