全部のレコードからuser_id=7の時間順のstart_atとend_atの時間を表示して下さい
moove=# SELECT user_id, start_at, end_at FROM records WHERE user_id = 7 ORDER BY start_at ASC;
user_id | start_at | end_at
---------+---------------------+---------------------
7 | 2023-03-01 03:38:00 | 2023-03-01 03:58:30
7 | 2023-03-01 03:59:00 | 2023-03-01 04:03:00
7 | 2023-03-01 04:03:30 | 2023-03-01 04:09:30
7 | 2023-03-01 04:10:00 | 2023-03-01 04:15:30
7 | 2023-03-01 04:16:00 | 2023-03-01 05:22:30
中略
7 | 2023-05-17 10:48:00 | 2023-05-17 10:54:30
7 | 2023-05-17 10:55:00 | 2023-05-17 11:09:00
7 | 2023-05-17 11:09:30 | 2023-05-17 11:38:30
7 | 2023-05-17 11:39:00 | 2023-05-17 11:53:00
7 | 2023-05-17 11:53:30 | 2023-05-17 11:54:30
7 | 2023-05-17 11:55:00 | 2023-05-17 12:04:00
7 | 2023-05-17 12:04:30 | 2023-05-17 12:30:00
(1514 rows)