MySQL playground

select
  dense_rank() over w as rnk,
  first_name, department.name as dep_name,
  salary
from employee
  join department using(dep_id)
window w as (order by salary desc)
order by rnk, emp_id;

MySQL is an open source relational database system, a popular choice for web applications from the smallest personal sites to giants like Facebook.

⛫ homepage • αω tutorial • ⚘ community

Sandbox details

MySQL version:      8.1
sandbox engine:     codapi
sandbox name:       mysql
allowed commands:   run
in-browser:         ✘

Usage example:

```sql
select 'Hello, World!' as message;
```

<codapi-snippet sandbox="mysql" editor="basic">
</codapi-snippet>

Documentation