mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-14 03:25:15 +00:00
16 lines
700 B
SQL
16 lines
700 B
SQL
SET compile_expressions = 1;
|
|
SET min_count_to_compile_expression = 0;
|
|
|
|
DROP TABLE IF EXISTS test_table;
|
|
CREATE TABLE test_table (a UInt64) ENGINE = MergeTree() ORDER BY tuple();
|
|
INSERT INTO test_table VALUES (1);
|
|
|
|
SELECT test_table.a FROM test_table ORDER BY (test_table.a > test_table.a) + 1;
|
|
SELECT test_table.a FROM test_table ORDER BY (test_table.a >= test_table.a) + 1;
|
|
|
|
SELECT test_table.a FROM test_table ORDER BY (test_table.a < test_table.a) + 1;
|
|
SELECT test_table.a FROM test_table ORDER BY (test_table.a <= test_table.a) + 1;
|
|
|
|
SELECT test_table.a FROM test_table ORDER BY (test_table.a == test_table.a) + 1;
|
|
SELECT test_table.a FROM test_table ORDER BY (test_table.a != test_table.a) + 1;
|