mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
a7bbf83c91
This reverts commit cdb2c8a770
.
22 lines
750 B
SQL
22 lines
750 B
SQL
USE test;
|
|
|
|
CREATE TABLE IF NOT EXISTS uuid
|
|
(
|
|
created_at DateTime,
|
|
id UUID
|
|
)
|
|
ENGINE = MergeTree
|
|
PARTITION BY toDate(created_at)
|
|
ORDER BY (created_at, id);
|
|
|
|
INSERT INTO uuid (created_at, id) VALUES ('2018-01-01 01:02:03', '00000000-0000-03f8-9cb8-cb1b82fb3900');
|
|
|
|
SELECT count() FROM uuid WHERE id = '00000000-0000-03f8-9cb8-cb1b82fb3900';
|
|
SELECT count() FROM uuid WHERE id != '00000000-0000-03f8-9cb8-cb1b82fb3900';
|
|
SELECT count() FROM uuid WHERE id < '00000000-0000-03f8-9cb8-cb1b82fb3900';
|
|
SELECT count() FROM uuid WHERE id > '00000000-0000-03f8-9cb8-cb1b82fb3900';
|
|
SELECT count() FROM uuid WHERE id <= '00000000-0000-03f8-9cb8-cb1b82fb3900';
|
|
SELECT count() FROM uuid WHERE id >= '00000000-0000-03f8-9cb8-cb1b82fb3900';
|
|
|
|
DROP TABLE uuid;
|