mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
33 lines
720 B
SQL
33 lines
720 B
SQL
CREATE TABLE t1 (c0 Int32, PRIMARY KEY (c0)) ENGINE = MergeTree;
|
|
SELECT DISTINCT *
|
|
FROM
|
|
(
|
|
SELECT DISTINCT
|
|
cos(sign(exp(t1.c0))),
|
|
-min2(pow(t1.c0, t1.c0), intDiv(t1.c0, t1.c0)),
|
|
t1.c0,
|
|
t1.c0,
|
|
erf(abs(-t1.c0))
|
|
FROM t1
|
|
WHERE t1.c0 > 0
|
|
UNION ALL
|
|
SELECT DISTINCT
|
|
cos(sign(exp(t1.c0))),
|
|
-min2(pow(t1.c0, t1.c0), intDiv(t1.c0, t1.c0)),
|
|
t1.c0,
|
|
t1.c0,
|
|
erf(abs(-t1.c0))
|
|
FROM t1
|
|
WHERE NOT (t1.c0 > 0)
|
|
UNION ALL
|
|
SELECT DISTINCT
|
|
cos(sign(exp(t1.c0))),
|
|
-min2(pow(t1.c0, t1.c0), intDiv(t1.c0, t1.c0)),
|
|
t1.c0,
|
|
t1.c0,
|
|
erf(abs(-t1.c0))
|
|
FROM t1
|
|
WHERE t1.c0 > (0 IS NULL)
|
|
);
|
|
|