首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

一段复合查询的sql话语备份 排序 group

2012-09-05 
一段复合查询的sql语句备份 排序 groupselect * from brands b join (select brand_id,count(*) as produc

一段复合查询的sql语句备份 排序 group
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

热点排行