浅析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
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