2023-04-19 08:41:45 +00:00
|
|
|
SELECT transform(number, [2, 4, 6], ['google', 'yandex', 'yahoo'], 'other') as x FROM numbers(10) GROUP BY x ORDER BY x;
|
2023-04-18 09:06:34 +00:00
|
|
|
SELECT '#1';
|
2023-04-19 08:41:45 +00:00
|
|
|
SELECT transform(number, [2, 4, 6], [29, 20, 21], 22) as x FROM numbers(10) GROUP BY x ORDER BY x;
|
2023-04-18 09:06:34 +00:00
|
|
|
SELECT '#2';
|
2023-04-19 08:41:45 +00:00
|
|
|
SELECT transform(number, [2, 4, 6], [29, 20, 21]) as x FROM numbers(10) GROUP BY x ORDER BY x;
|
2023-04-18 09:06:34 +00:00
|
|
|
SELECT '#3';
|
2023-04-19 08:41:45 +00:00
|
|
|
SELECT transform(toString(number), ['2', '4', '6'], [29, 20, 21], 22) as x FROM numbers(10) GROUP BY x ORDER BY x;
|
2023-04-18 09:06:34 +00:00
|
|
|
SELECT '#4';
|
2023-04-19 08:41:45 +00:00
|
|
|
SELECT transform(toString(number), ['2', '4', '6'], ['google', 'yandex', 'yahoo'], 'other') as x FROM numbers(10) GROUP BY x ORDER BY x;
|
2023-04-18 09:06:34 +00:00
|
|
|
SELECT '#5';
|
2023-04-19 08:41:45 +00:00
|
|
|
SELECT transform(toString(number), ['2', '4', '6'], ['google', 'yandex', 'yahoo']) as x FROM numbers(10) GROUP BY x ORDER BY x;
|
2023-04-18 09:06:34 +00:00
|
|
|
SELECT '----';
|
2023-04-19 08:41:45 +00:00
|
|
|
SELECT transform(number, [2, 4, 6], ['google', 'yandex', 'yahoo'], materialize('other')) as x FROM numbers(10) GROUP BY x ORDER BY x;
|
2023-04-18 09:06:34 +00:00
|
|
|
SELECT '#1';
|
2023-04-19 08:41:45 +00:00
|
|
|
SELECT transform(number, [2, 4, 6], [29, 20, 21], materialize(22)) as x FROM numbers(10) GROUP BY x ORDER BY x;
|
2023-04-18 09:06:34 +00:00
|
|
|
SELECT '#3';
|
2023-04-19 08:41:45 +00:00
|
|
|
SELECT transform(toString(number), ['2', '4', '6'], [29, 20, 21], materialize(22)) as x FROM numbers(10) GROUP BY x ORDER BY x;
|
2023-04-18 09:06:34 +00:00
|
|
|
SELECT '#4';
|
2023-04-19 08:41:45 +00:00
|
|
|
SELECT transform(toString(number), ['2', '4', '6'], ['google', 'yandex', 'yahoo'], materialize('other')) as x FROM numbers(10) GROUP BY x ORDER BY x;
|
2023-04-18 09:06:34 +00:00
|
|
|
SELECT '----';
|
2023-04-19 08:41:45 +00:00
|
|
|
SELECT transform(number, [2, 4, 6], [2900, 2000, 2100], 2200) as x FROM numbers(10) GROUP BY x ORDER BY x;
|
2023-04-18 09:06:34 +00:00
|
|
|
SELECT '#1';
|
2023-04-19 08:41:45 +00:00
|
|
|
SELECT transform(number, [2, 4, 6], [2900, 2000, 2100], materialize(2200)) as x FROM numbers(10) GROUP BY x ORDER BY x;
|
2023-04-18 16:17:26 +00:00
|
|
|
SELECT '----';
|
|
|
|
SELECT transform(number, [1], [null]) FROM system.numbers LIMIT 1; -- { serverError ILLEGAL_TYPE_OF_ARGUMENT }
|