chDB playground

import chdb

query_sql = """
select
  dense_rank() over w as rank,
  first_name, dep_id, salary
from 'employees.csv'
window w as (order by salary desc)
order by rank, emp_id
settings output_format_pretty_row_numbers = 0
"""

res = chdb.query(query_sql, "PrettyCompactNoEscapes")
print(res, end="")

chDB is an embeddable, in-process SQL OLAP engine powered by ClickHouse. chDB is modest in size, runs on smaller machines, and provides language bindings for Python, Node.js, Go, Rust and C/C++.

⛫ homepage • αω tutorial • ⚘ community

Sandbox details

chDB version:       3.1
ClickHouse version: 24.8
sandbox engine:     codapi
sandbox name:       chdb
command:            python
in-browser:         ✘

Usage example:

```python
import chdb

sql = "select 'Hello, World!' as message;"
res = chdb.query(sql)
print(res)
```

<codapi-snippet sandbox="chdb" command="python" editor="basic">
</codapi-snippet>

Documentation