Last active
February 12, 2016 20:30
-
-
Save kgorman/a6445486b8d861fabcef to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- here is my stream | |
drop stream test_stream cascade; | |
create stream test_stream (speed int, ts int, tail char(10)); | |
create continuous view v1 as select ts, tail, speed from test_stream; | |
create continuous view v2 as select tail, keyed_max(ts, speed) from test_stream group by tail; | |
-- put some data into it | |
insert into test_stream values (100, 1, 'YY'); | |
insert into test_stream values (500, 1, 'ZZ'); | |
insert into test_stream values (110, 2, 'YY'); | |
select * from v1; | |
select * from v2; | |
insert into test_stream values (600, 3, 'YY'); | |
select * from v2; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment