MySQL Group from quarters to periods
问题 I have a table like this: Person smallint(5) act_time datetime 1 2020-05-29 07:00:00 1 2020-05-29 07:15:00 1 2020-05-29 07:30:00 2 2020-05-29 07:15:00 2 2020-05-29 07:30:00 1 2020-05-29 10:30:00 1 2020-05-29 10:45:00 The table above is an example with 2 different persons and there is a row for each quarter they are at work... What is the best way in MySQL to "convert" this table to another table where there is a column for "person", a column for "start" and one for "stop". So the result is