2023-11-21 09:04:46 +00:00
|
|
|
-- { echo ON }
|
2024-01-11 03:38:32 +00:00
|
|
|
SELECT arrayJoin([(k1, v), (k2, v)]) AS row, row.1 as k FROM t FINAL WHERE k1 != 3 AND k = 1 ORDER BY row SETTINGS enable_vertical_final = 0;
|
2023-11-21 09:04:46 +00:00
|
|
|
(1,4) 1
|
2024-01-11 03:38:32 +00:00
|
|
|
SELECT arrayJoin([(k1, v), (k2, v)]) AS row, row.1 as k FROM t FINAL WHERE k1 != 3 AND k = 1 ORDER BY row SETTINGS enable_vertical_final = 1;
|
2023-11-21 09:04:46 +00:00
|
|
|
(1,4) 1
|
2024-01-11 03:38:32 +00:00
|
|
|
SELECT arrayJoin([(k1, v), (k2, v)]) AS row, row.1 as k FROM t FINAL WHERE k1 != 3 AND k = 2 ORDER BY row SETTINGS enable_vertical_final = 0;
|
2023-11-21 09:04:46 +00:00
|
|
|
(2,4) 2
|
|
|
|
(2,5) 2
|
2024-01-11 03:38:32 +00:00
|
|
|
SELECT arrayJoin([(k1, v), (k2, v)]) AS row, row.1 as k FROM t FINAL WHERE k1 != 3 AND k = 2 ORDER BY row SETTINGS enable_vertical_final = 1;
|
2023-11-21 09:04:46 +00:00
|
|
|
(2,4) 2
|
|
|
|
(2,5) 2
|
2024-01-11 03:38:32 +00:00
|
|
|
SELECT arrayJoin([(k1, v), (k2, v)]) AS row, row.1 as k FROM t FINAL WHERE k1 != 3 AND k = 3 ORDER BY row SETTINGS enable_vertical_final = 0;
|
2023-11-21 09:04:46 +00:00
|
|
|
(3,5) 3
|
2024-01-11 03:38:32 +00:00
|
|
|
SELECT arrayJoin([(k1, v), (k2, v)]) AS row, row.1 as k FROM t FINAL WHERE k1 != 3 AND k = 3 ORDER BY row SETTINGS enable_vertical_final = 1;
|
2023-11-21 09:04:46 +00:00
|
|
|
(3,5) 3
|