client1.send('CREATE DATABASE IF NOT EXISTS 01070_window_view_watch_events')
client1.expect(prompt)
client1.send('DROP TABLE IF EXISTS 01070_window_view_watch_events.mt')
client1.expect(prompt)
client1.send('DROP TABLE IF EXISTS 01070_window_view_watch_events.wv NO DELAY')
client1.expect(prompt)
client1.send("CREATE TABLE 01070_window_view_watch_events.mt(a Int32, timestamp DateTime('US/Samoa')) ENGINE=MergeTree ORDER BY tuple()")
client1.expect(prompt)
client1.send("CREATE WINDOW VIEW 01070_window_view_watch_events.wv WATERMARK=ASCENDING AS SELECT count(a) AS count, tumbleEnd(wid) AS w_end FROM 01070_window_view_watch_events.mt GROUP BY tumble(timestamp, INTERVAL '5' SECOND, 'US/Samoa') AS wid")