ClickHouse/tests/queries/0_stateless/02715_or_null.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
556 B
MySQL
Raw Normal View History

2023-04-16 05:36:31 +00:00
SELECT argMaxOrNull(id, timestamp)
FROM
(
SELECT
CAST(NULL, 'Nullable(UInt32)') AS id,
2 AS timestamp
);
SELECT
argMax(id, timestamp),
argMaxOrNull(id, timestamp)
FROM
(
SELECT
CAST(NULL, 'Nullable(UInt32)') AS id,
2 AS timestamp
UNION ALL
SELECT
1 AS id,
1 AS timestamp
);
SELECT argMaxIfOrNull(id, timestamp, id IS NOT NULL)
FROM
(
SELECT
CAST(NULL, 'Nullable(UInt32)') AS id,
2 AS timestamp
UNION ALL
SELECT
1 AS id,
1 AS timestamp
);