Bạn có thể union
giữa một số truy vấn vào các thời điểm khác nhau:
(SELECT id, a_time AS time, metadata1, metadata2
FROM mytable)
UNION
(SELECT id, b_time AS time, metadata1, metadata2
FROM mytable)
UNION
(SELECT id, c_time AS time, metadata1, metadata2
FROM mytable)
UNION
(SELECT id, d_time AS time, metadata1, metadata2
FROM mytable)
ORDER BY time