mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-20 06:32:08 +00:00
13 lines
213 B
MySQL
13 lines
213 B
MySQL
|
DROP TABLE IF EXISTS mt;
|
||
|
CREATE TABLE mt (x UInt8, y Date) ENGINE = MergeTree ORDER BY x;
|
||
|
|
||
|
SELECT count()
|
||
|
FROM mt
|
||
|
ANY LEFT JOIN
|
||
|
(
|
||
|
SELECT 1 AS x
|
||
|
) USING (x)
|
||
|
PREWHERE x IN (1) WHERE y = today();
|
||
|
|
||
|
DROP TABLE mt;
|