首页 > 代码库 > 浅析group by,having count()

浅析group by,having count()

SELECT COUNT(*) FROM (SELECT COUNT(id),order_type,city_id,category_id,major_category_id,puid,user_id
FROM sticky_order
GROUP BY order_type,city_id,category_id,major_category_id,puid,user_id
HAVING COUNT(id) > 1) A

 

浅析group by,having count()