sql insert into test.g using st TAGS ("TAG1") values("2023-05-03 00:00:00.000", 1)
sql insert into test.t using st TAGS ("TAG1") values("2023-05-03 00:00:00.000", 1)
sql insert into test.tg using st TAGS ("TAG1") values("2023-05-03 00:00:00.000", 1)
sql select sum(case when t.c2 is NULL then 0 else 1 end + case when t.c2 is NULL then 0 else 1 end), sum(case when t.c2 is NULL then 0 else 1 end + case when t.c2 is NULL then 0 else 1 end + case when t.c2 is NULL then 0 else 1 end) from test.t t, test.g g, test.tg tg where t.day = g.day and t.day = tg.day and t.day between '2021-05-03' and '2023-05-04' and t.vin = 'TAG1' and t.vin = g.vin and t.vin = tg.vin group by t.day;