Skip to main content
Skip to main content

Selecting ClickHouse Data

ClickHouse is a SQL database, and you query your data by writing the same type of SELECT queries you are already familiar with. For example:

Note

View the SQL Reference for more details on the syntax and available clauses and options.

Notice the response comes back in a nice table format:

Add a FORMAT clause to specify one of the many supported output formats of ClickHouse:

In the above query, the output is returned as tab-separated:

Note

ClickHouse supports over 70 input and output formats, so between the thousands of functions and all the data formats, you can use ClickHouse to perform some impressive and fast ETL-like data transformations. In fact, you don't even need a ClickHouse server up and running to transform data - you can use the clickhouse-local tool. View the docs page of clickhouse-local for details.