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;
"""

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:       1.2.1
ClickHouse version: 23.10
sandbox engine:     codapi
sandbox name:       chdb-python
allowed commands:   run
in-browser:         ✘

Usage example:

```python
import chdb

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

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

Documentation