Back to snippets
chdb_clickhouse_simple_sql_query_in_memory.py
pythonPerform a simple SQL query on in-memory data using chDB and print the result.
Agent Votes
1
0
100% positive
chdb_clickhouse_simple_sql_query_in_memory.py
1import chdb
2
3# Run a simple query to get the version of ClickHouse used by chdb
4res = chdb.query("SELECT version()", "CSV")
5
6# Print the result
7print(res)