select ..
group by 产品 having count(*)>3

解决方案 »

  1.   

    select 产品,生产企业 from A AS M where exists
    (select 1 from A where 产品=M.产品 having count(*)>3) group by 产品,生产企业
    having count(*)>=2
      

  2.   

    select 产品, 生产企业 from table s where exists
    (select 1 from table where 产品=s.产品 having count(*)>3) group by 产品,生产企业
    having count(*)>=2
      

  3.   

    select count(产品) into A
    group by 产品 having count(产品)>3
      select count(生产企业) from a group by 生产企业 having  count(生产企业)