clickhouse sql 查询:
需求:在表iot中按时间(dates)排序,找出连续相同的value值中的第一个,如:
value dates
1.3 2023-05-09 09:00:02 960
1.3 2023-05-09 09:00:02 555
1.2 2023-05-09 09:00:02 011
1.2 2023-05-09 09:00:01 847
1.2 2023-05-09 09:00:01 621
1.2 2023-05-09 09:00:01 041
1.1 2023-05-09 09:00:00 786
1.1 2023-05-09 09:00:00 446
1.1 2023-05-09 09:00:00 145
结果集应该是:
value dates
1.3 2023-05-09 09:00:02 960
1.2 2023-05-09 09:00:02 011
1.1 2023-05-09 09:00:00 786
一次执行输出结果,SQL该怎么写呢?