mysql group by 并查出前面几条
select a.*,
b.name as bname
from sk_product a
left join sk_product_category b
on a.category_id = b.id
where 6 > (
select count(*)
from sk_product
and order_list > a.order_list
)
order by a.category_id
select a.*,
b.name as bname
from sk_product a
left join sk_product_category b
on a.category_id = b.id
where 6 > (
select count(*)
from sk_product
and order_list > a.order_list
)
order by a.category_id