不明白你是不是需要 一个单位中所有level='A'的数量????
那count一下啊
select danweiId , danweiName , count(level) from sale
where level='A' and danweiID in (select danweiID from danwei)
group by danweiId , danweiName
那count一下啊
select danweiId , danweiName , count(level) from sale
where level='A' and danweiID in (select danweiID from danwei)
group by danweiId , danweiName
还有为什么group by danweiId , danweiName
谢谢