----查询goods_sn相同记录超过9条的记录 select t0.* from cms_xiu_billboard t0 where t0.goods_sn in( select t.goods_sn from cms_xiu_billboard t group by t.goods_sn having count(t.goods_sn) > 9 )
----查询goods_sn相同记录超过9条的记录 并且增加where 条件 select * from cms_xiu_billboard cx where cx.catelog = 8 and cx.biz_type = 1 and cx.location = 1 and cx.goods_sn in ( select goods_sn from cms_xiu_billboard cc where cc.catelog = 8 and cc.biz_type = 1 and cc.location = 1 group by cc.goods_sn having count(cc.goods_sn) >9 )