Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
How to find 2nd highest salary
create table sal ( id int, sal float ) insert into sal values(1,100),(2,500),(3,400),(4,200),(5,400),(6,350),(7,350) select * from sal order by sal desc ; with cte as ( select * , dense_rank() over (order by sal desc)dn from sal ) select id, sal from cte where dn = 2 select * , dense_rank() over (order by sal desc)dn from sal
run
|
edit
|
history
|
help
0
Demo
split a string into pairs of words
Task1
sql6
SQL_Joins_Intersect_Except_Union
SQL Problem Template
aaa
mySQL_Glx_12dec
llaves vistas (alumnos) Karen
RBT QA