Clickhouse: How to join two tables?

Created on 19 Jun 2018  Â·  1Comment  Â·  Source: ClickHouse/ClickHouse

How can I join two simple tables?

My tables are very simple.

  1. Table A contains two columns - id (int), col1 (string)
  2. Table B contains two columns - id (int), col2 (string)

My query looks like:

SELECT *
FROM testing_table1
JOIN testing_table2 ON testing_table1.id = testing_table2.id;

I am getting error Unknown identifier testing_table2.id

What am I doing wrong?

Thanks a lot

Most helpful comment

Join syntax is pretty limited at the moment and it's on the roadmap for this year to fix it.

Currently the most common option is joining subqueries connected with USING instead of ON, see the docs: https://clickhouse.yandex/docs/en/query_language/queries/#join-clause

>All comments

Join syntax is pretty limited at the moment and it's on the roadmap for this year to fix it.

Currently the most common option is joining subqueries connected with USING instead of ON, see the docs: https://clickhouse.yandex/docs/en/query_language/queries/#join-clause

Was this page helpful?
0 / 5 - 0 ratings