mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-14 10:22:10 +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;
|