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