v.18.12Improvement
Duplicate Columns in USING Clause for JOIN
Duplicate columns can be used in aUSINGclause forJOIN. #3006
Why it matters
This feature allows users to join tables on multiple columns having the same name more conveniently by specifying duplicate column names in theUSING clause. It simplifies writing join conditions when dealing with tables sharing column names and improves query readability and usability.How to use it
When writing aJOIN query, include multiple column names with duplicates inside the USING clause as usual. For example:SELECT * FROM table1
JOIN table2 USING (column1, column2, column1)This instructs ClickHouse to perform the join using all specified columns, including duplicates.