mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-04 21:42:39 +00:00
43 lines
1.8 KiB
MySQL
43 lines
1.8 KiB
MySQL
|
SELECT number, neighbor(toString(number), 0) FROM numbers(10);
|
||
|
|
||
|
SELECT number, neighbor(toString(number), 5) FROM numbers(10);
|
||
|
SELECT number, neighbor(toString(number), -5) FROM numbers(10);
|
||
|
|
||
|
SELECT number, neighbor(toString(number), 10) FROM numbers(10);
|
||
|
SELECT number, neighbor(toString(number), -10) FROM numbers(10);
|
||
|
|
||
|
SELECT number, neighbor(toString(number), 15) FROM numbers(10);
|
||
|
SELECT number, neighbor(toString(number), -15) FROM numbers(10);
|
||
|
|
||
|
SELECT number, neighbor(toString(number), 5, 'Hello') FROM numbers(10);
|
||
|
SELECT number, neighbor(toString(number), -5, 'World') FROM numbers(10);
|
||
|
|
||
|
SELECT number, neighbor(toString(number), 5, concat('Hello ', toString(number))) FROM numbers(10);
|
||
|
SELECT number, neighbor(toString(number), -5, concat('World ', toString(number))) FROM numbers(10);
|
||
|
|
||
|
|
||
|
SELECT number, neighbor('ClickHouse', 0) FROM numbers(10);
|
||
|
|
||
|
SELECT number, neighbor('ClickHouse', 5) FROM numbers(10);
|
||
|
SELECT number, neighbor('ClickHouse', -5) FROM numbers(10);
|
||
|
|
||
|
SELECT number, neighbor('ClickHouse', 10) FROM numbers(10);
|
||
|
SELECT number, neighbor('ClickHouse', -10) FROM numbers(10);
|
||
|
|
||
|
SELECT number, neighbor('ClickHouse', 15) FROM numbers(10);
|
||
|
SELECT number, neighbor('ClickHouse', -15) FROM numbers(10);
|
||
|
|
||
|
SELECT number, neighbor('ClickHouse', 5, 'Hello') FROM numbers(10);
|
||
|
SELECT number, neighbor('ClickHouse', -5, 'World') FROM numbers(10);
|
||
|
|
||
|
SELECT number, neighbor('ClickHouse', 5, concat('Hello ', toString(number))) FROM numbers(10);
|
||
|
SELECT number, neighbor('ClickHouse', -5, concat('World ', toString(number))) FROM numbers(10);
|
||
|
|
||
|
|
||
|
SELECT number, neighbor(toString(number), number) FROM numbers(10);
|
||
|
SELECT number, neighbor(toString(number), intDiv(number, 2)) FROM numbers(10);
|
||
|
|
||
|
SELECT number, neighbor('Hello', number) FROM numbers(10);
|
||
|
SELECT number, neighbor('Hello', -3) FROM numbers(10);
|
||
|
SELECT number, neighbor('Hello', -3, 'World') FROM numbers(10);
|