MySQL: Get start & end timestamp for each day

后端 未结 3 658
无人共我
无人共我 2021-01-25 18:05

Similar to the question at MYSQL: Find Start and End Timestamp of a consecutive count, I have a table with similar data:

StatusTime          | Reading   
2014-01-01 0         


        
3条回答
  •  伪装坚强ぢ
    2021-01-25 18:52

    Something like this?

    SELECT DISTINCT MAX(StatusTime), MIN(StatusTime) 
    FROM table_name
    WHERE Reading < 50 OR Reading > 50;
    

提交回复
热议问题