select id, title, typefrom (select id, title, type, @num := if(@group = type, @num + 1, 1) as row_number, @group := type as dummy from your_table order by type, title) as xwhere row_number <= 3
(与Martin Wickman的答案在同一网站上使用另一篇文章!)

select id, title, typefrom (select id, title, type, @num := if(@group = type, @num + 1, 1) as row_number, @group := type as dummy from your_table order by type, title) as xwhere row_number <= 3
(与Martin Wickman的答案在同一网站上使用另一篇文章!)