PostgreSQL playground

select
  dense_rank() over w as rank,
  name, department, salary
from employees
window w as (order by salary desc)
order by rank, id;
This playground is completely in-browser, using the PGlite runtime.

The first run will download the PostgreSQL runtime (12 MB), so it may take some time. Subsequent runs will be instantaneous.

PostgreSQL is a powerful, open source object-relational database system with a reputation for reliability, feature robustness, and performance.

⛫ homepage • αω tutorial • ⚘ community

Sandbox details

Postgres version:   15
sandbox engine:     pglite
sandbox name:       postgres
allowed commands:   run
in-browser:         ✔

Usage example:

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

<codapi-snippet engine="pglite" sandbox="postgres"
    editor="basic" output-mode="table">
</codapi-snippet>

Documentation