mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 21:51:57 +00:00
15 lines
335 B
MySQL
15 lines
335 B
MySQL
|
SELECT sum(toNullable('a') IN 'a');
|
||
|
SELECT countIf(number, toNullable('a') IN ('a', 'b')) FROM numbers(100);
|
||
|
|
||
|
SELECT
|
||
|
uniqExact(x) AS u,
|
||
|
uniqExactIf(x, name = 'a') AS ue,
|
||
|
uniqExactIf(x, name IN ('a', 'b')) AS ui
|
||
|
FROM
|
||
|
(
|
||
|
SELECT
|
||
|
toNullable('a') AS name,
|
||
|
arrayJoin(range(10)) AS x
|
||
|
)
|
||
|
WHERE name = 'a';
|