SELECT
help_type,
count(*) help_count,
count( DISTINCT (enterprise_name)) enterprise_count
FROM
enterprise_help
GROUP BY
help_type
mysql根据字段分组查询总数,并查询某字段去重后的数量
最新推荐文章于 2024-04-17 15:25:46 发布
SELECT
help_type,
count(*) help_count,
count( DISTINCT (enterprise_name)) enterprise_count
FROM
enterprise_help
GROUP BY
help_type