SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
create table t1 (c1 datetime, event_type nvarchar(max)); go insert into t1 values ('2022-11-14', 'page_open'); insert into t1 values ('2022-11-15', 'game_start'); insert into t1 values ('2022-11-16', 'game_start'); insert into t1 values ('2022-11-17', 'game_start'); insert into t1 values ('2022-11-18', 'game_start'); insert into t1 values ('2022-11-19', 'game_start'); insert into t1 values ('2022-11-20', 'page_open'); insert into t1 values ('2022-11-21', 'game_start'); go select * from t1 -- общая go select a.c1, a.event_type from ( select LAG(event_type,1,0) over(order by c1) r, c1,event_type from t1 ) a where (a.r != event_type) order by c1
Stuck with a problem? Got Error? Ask ChatGPT!
Copy Clear