Bạn có thể sử dụng một truy vấn như sau:
SELECT PostID, title, position
FROM (
SELECT PostID, title, position,
@grp := IF(@pos = position, @grp + 1,
IF(@pos := position, 1, 1)) AS grp
FROM mytable
CROSS JOIN (SELECT @grp := 0, @pos := '') AS vars
ORDER BY position, title) AS t
ORDER BY grp, FIELD(position, 'Middle', 'Bottom', 'Top')