状态为有效 无效 暂缓.楼盘名为Esname。想要查询 AAA和BBB楼盘里有效的房源有多少无效的房源有多少暂缓的有多少。 我写了个这样的 select e.Esname,(select count(1) from Es inner join Pr on Pr.EsID=Es.EsID where Pr.Status='有效' and Esname in('AAA','BBB')),(select count(1) from Es inner join Pr on Pr.EsID=Es.EsID where Pr.Status='无效' and Esname in('AAA','BBB')) from Es e inner join Pr p on p.EsID=e.EsID where Esname in('AAA','BBB') order by e.Esname 但是查询的结果是一样的 北京市