Collections
Datasets
Tools
CSV to SQL
JSON to SQL
Sign In
Name
Description
Use window functions and DENSE_RANK to find the Nth-ranked value per group while handling ties correctly.
Database
PostgreSQL
MySQL
MariaDB
Oracle
Cancel
Save
Settings
Fork this book
Notes
SQL
MySQL - 8.0
Oracle - 21.3.0
PostgreSQL - 17
ERD
Run Code
Read-only book
Fork to Edit
Tip: Press
Alt
+
Enter
to run SQL
SQL Output
Clear
Getting Started
1
Switch to a SQL tab and select a database
2
Write or paste your SQL in the editor
3
Press
Alt
+
Enter
to run
Quick Templates
Show Tables
Basic SELECT
JOIN Example
Create Table
Tip:
Select text in the editor to run only that portion
2. Second Highest Salary Per Department
Updated 1/24/26, 11:25 PM
Notes
SQL
Alt+Enter to run