आप निम्न की तरह एक क्वेरी का उपयोग कर सकते हैं:
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')