create table employeedetails(id int, name varchar(20),gender varchar(10),salary int ,city varchar(10))
insert into employeedetails values (1,'jitendra','male',1000,'hyderabad'),(2,'shubham','male',10000,'pune'),
(3,'ajith','male',5000,'banglore'),(4,'jyothi','female',1000,'pune'),(5,'swathi','female',5000,'banglore'),
(6,'rajesh','male',6000,'pune'),(7,'anushka','male',6000,'banglore'),(8,'john','male',9000,'hyderabad'),
(9,'rohit','male',1000,'pune'),(10,'madhuri','female',9000,'pune')
select * from employeedetails
--row number
select name,id,ROW_NUMBER() over(order by id desc) as row from employee
select name,salary, RANK() over (order by id desc) as row from employee
select name,salary ,DENSE_RANK() over (order by id asc) as row from employee
select name,salary, NTILE(4) over (order by id asc ) as row from employee
jitendra