select * from brands b join (select brand_id,count(*) as product_amount from products where id in (#{product_id_array.join(',')}) group by brand_id order by count(*) desc) as bc where b.id = bc.brand_id order by bc.product_amount desc
一段复合查询的sql语句备份 排序 group
最新推荐文章于 2024-03-02 10:12:01 发布