SQL Polyglot
Run a query and get results from:
Write a query below or pick one:
columns
join using
exists
group by
rollup
window
percentile
fetch
upsert
except
json
recursive cte
information schema
arrays
strings
select dense_rank() over w as erank, first_name, dep.name as dep_name, salary from employee as emp join department as dep on emp.dep_id = dep.dep_id window w as (order by salary desc) order by erank, emp_id;
employee department
┌────────────┬─────────────┐ ┌────────────┬─────────────┐
│ name │ type │ │ name │ type │
├────────────┼─────────────┤ ├────────────┼─────────────┤
│ emp_id │ integer │ │ dep_id │ varchar(10) │
│ first_name │ varchar(50) │ │ name │ varchar(50) │
│ last_name │ varchar(50) │ │ manager_id │ integer │
│ birth_dt │ date │ └────────────┴─────────────┘
│ hire_dt │ date │ salary
│ dep_id │ varchar(10) │ ┌────────────┬─────────────┐
│ city │ varchar(50) │ │ name │ type │
│ salary │ integer │ ├────────────┼─────────────┤
│ │ │ │ emp_id │ integer │
│ │ │ │ start_dt │ date │
│ │ │ │ end_dt │ date │
│ │ │ │ salary │ integer │
└────────────┴─────────────┘ └────────────┴─────────────┘
You can add, remove or change database objects. This can
be tricky though, as the syntax should be cross-database
compatible to succeed.
SQL Polyglot is a quick way to see if a particular SQL feature is supported in different database systems. Write a query and see it run anywhere from PostgreSQL to DuckDB without leaving your browser.