Skip to content

Commit 788641c

Browse files
authored
Merge pull request #3761 from ClickHouse/tpc-h-cor-sq
TPC-H docs: Update correlated subqueries
2 parents d9ba13b + e7e8ad0 commit 788641c

File tree

1 file changed

+18
-6
lines changed
  • docs/getting-started/example-datasets

1 file changed

+18
-6
lines changed

docs/getting-started/example-datasets/tpch.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ ORDER BY
234234
**Q2**
235235

236236
```sql
237+
SET allow_experimental_correlated_subqueries = 1; -- since v25.5
238+
237239
SELECT
238240
s_acctbal,
239241
s_name,
@@ -280,7 +282,7 @@ ORDER BY
280282
```
281283

282284
::::note
283-
As of February 2025, the query does not work out-of-the box due to correlated subqueries. Corresponding issue: https://github.com/ClickHouse/ClickHouse/issues/6697
285+
Until v25.5, the query did not work out-of-the box due to correlated subqueries. Corresponding issue: https://github.com/ClickHouse/ClickHouse/issues/6697
284286

285287
This alternative formulation works and was verified to return the reference results.
286288

@@ -365,6 +367,8 @@ ORDER BY
365367
**Q4**
366368

367369
```sql
370+
SET allow_experimental_correlated_subqueries = 1; -- since v25.5
371+
368372
SELECT
369373
o_orderpriority,
370374
count(*) AS order_count
@@ -389,7 +393,7 @@ ORDER BY
389393
```
390394

391395
::::note
392-
As of February 2025, the query does not work out-of-the box due to correlated subqueries. Corresponding issue: https://github.com/ClickHouse/ClickHouse/issues/6697
396+
Until v25.5, the query did not work out-of-the box due to correlated subqueries. Corresponding issue: https://github.com/ClickHouse/ClickHouse/issues/6697
393397

394398
This alternative formulation works and was verified to return the reference results.
395399

@@ -823,6 +827,8 @@ ORDER BY
823827
**Q17**
824828

825829
```sql
830+
SET allow_experimental_correlated_subqueries = 1; -- since v25.5
831+
826832
SELECT
827833
sum(l_extendedprice) / 7.0 AS avg_yearly
828834
FROM
@@ -843,7 +849,7 @@ WHERE
843849
```
844850

845851
::::note
846-
As of February 2025, the query does not work out-of-the box due to correlated subqueries. Corresponding issue: https://github.com/ClickHouse/ClickHouse/issues/6697
852+
Until v25.5, the query did not work out-of-the box due to correlated subqueries. Corresponding issue: https://github.com/ClickHouse/ClickHouse/issues/6697
847853

848854
This alternative formulation works and was verified to return the reference results.
849855

@@ -954,6 +960,8 @@ WHERE
954960
**Q20**
955961

956962
```sql
963+
SET allow_experimental_correlated_subqueries = 1; -- since v25.5
964+
957965
SELECT
958966
s_name,
959967
s_address
@@ -994,12 +1002,14 @@ ORDER BY
9941002
```
9951003

9961004
::::note
997-
As of February 2025, the query does not work out-of-the box due to correlated subqueries. Corresponding issue: https://github.com/ClickHouse/ClickHouse/issues/6697
1005+
Until v25.5, the query did not work out-of-the box due to correlated subqueries. Corresponding issue: https://github.com/ClickHouse/ClickHouse/issues/6697
9981006
::::
9991007

10001008
**Q21**
10011009

10021010
```sql
1011+
SET allow_experimental_correlated_subqueries = 1; -- since v25.5
1012+
10031013
SELECT
10041014
s_name,
10051015
count(*) AS numwait
@@ -1041,12 +1051,14 @@ ORDER BY
10411051
s_name;
10421052
```
10431053
::::note
1044-
As of February 2025, the query does not work out-of-the box due to correlated subqueries. Corresponding issue: https://github.com/ClickHouse/ClickHouse/issues/6697
1054+
Until v25.5, the query did not work out-of-the box due to correlated subqueries. Corresponding issue: https://github.com/ClickHouse/ClickHouse/issues/6697
10451055
::::
10461056

10471057
**Q22**
10481058

10491059
```sql
1060+
SET allow_experimental_correlated_subqueries = 1; -- since v25.5
1061+
10501062
SELECT
10511063
cntrycode,
10521064
count(*) AS numcust,
@@ -1086,5 +1098,5 @@ ORDER BY
10861098
```
10871099

10881100
::::note
1089-
As of February 2025, the query does not work out-of-the box due to correlated subqueries. Corresponding issue: https://github.com/ClickHouse/ClickHouse/issues/6697
1101+
Until v25.5, the query did not work out-of-the box due to correlated subqueries. Corresponding issue: https://github.com/ClickHouse/ClickHouse/issues/6697
10901102
::::

0 commit comments

Comments
 (0)