mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
dbms: added test for prev. revision [#METR-14449].
This commit is contained in:
parent
10553e7840
commit
ffd5b1b410
@ -0,0 +1,2 @@
|
|||||||
|
2014-01-02 0 0 0000-00-00 00:00:00 2014-01-02 03:04:06
|
||||||
|
1 2014-01-02 03:04:06
|
@ -0,0 +1,13 @@
|
|||||||
|
DROP TABLE IF EXISTS default.test_table;
|
||||||
|
DROP TABLE IF EXISTS default.test_view;
|
||||||
|
|
||||||
|
CREATE TABLE default.test_table (EventDate Date, CounterID UInt32, UserID UInt64, EventTime DateTime, UTCEventTime DateTime) ENGINE = Memory;
|
||||||
|
CREATE MATERIALIZED VIEW default.test_view (Rows UInt64, MaxHitTime DateTime) ENGINE = Memory AS SELECT count() AS Rows, max(UTCEventTime) AS MaxHitTime FROM default.test_table;
|
||||||
|
|
||||||
|
INSERT INTO test_table (EventDate, UTCEventTime) VALUES ('2014-01-02', '2014-01-02 03:04:06');
|
||||||
|
|
||||||
|
SELECT * FROM default.test_table;
|
||||||
|
SELECT * FROM default.test_view;
|
||||||
|
|
||||||
|
DROP TABLE default.test_table;
|
||||||
|
DROP TABLE default.test_view;
|
Loading…
Reference in New Issue
Block a user