create table employee
insert into employee values(1,11111,10,'V')
insert into employee values(2,22222,11,'V')
insert into employee values(3,33333,1000,'V')
insert into employee values(4,44444,100,'V')
I need to find out employees based on priority excluding location_id '33333'.but that record also should come out from the final query.
for the above sample data the output should like this.
select *,row_number() over(order by priority desc)
but from above query 33333 location_id is coming out at the top.
id location_id priority status
4 44444 100
2 22222 11
1 11111 10
3 33333 10000