Код: Выделить всё
select x.type_id, cat.title, x.title, x.create_time, x.cat_id, x.content_short
from (
select items.type_id, cat.title, items.title as item_title, items.create_time, items.cat_id, items.content_short,
@num := if(@type = items.type_id, @num + 1, 1) as row_number,
@type := items.type_id as dummy
from objects items
join category cat on items.cat_id = cat.id
order by items.type_id, items.create_time
) as x
join category cat on x.cat_id = cat.id
where x.row_number <= 2;