select company ,count(distinct deptment) from table
where company=(select company from table where id=已知id) group by company; 先根据已知ID找出company再根据company统计不同的deptment数 |
oracle 分组查询
最新推荐文章于 2025-08-15 20:46:11 发布
select company ,count(distinct deptment) from table
where company=(select company from table where id=已知id) group by company; 先根据已知ID找出company再根据company统计不同的deptment数 |