mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
23 lines
253 B
MySQL
23 lines
253 B
MySQL
|
SELECT
|
||
|
count(),
|
||
|
countOrNull(),
|
||
|
sum(x),
|
||
|
sumOrNull(x)
|
||
|
FROM
|
||
|
(
|
||
|
SELECT number AS x
|
||
|
FROM numbers(10)
|
||
|
WHERE number > 10
|
||
|
);
|
||
|
|
||
|
SELECT
|
||
|
count(),
|
||
|
countOrNull(),
|
||
|
sum(x),
|
||
|
sumOrNull(x)
|
||
|
FROM
|
||
|
(
|
||
|
SELECT 1 AS x
|
||
|
WHERE 0
|
||
|
);
|