我的查询如下,并在其中包含一个子查询:
select count(distinct dNum)
from myDB.dbo.AQ
where A_ID in
(SELECT DISTINCT TOP (0.1) PERCENT A_ID,
COUNT(DISTINCT dNum) AS ud
FROM myDB.dbo.AQ
WHERE M > 1 and B = 0
GROUP BY A_ID ORDER BY ud DESC)
我收到的错误是...
Only one expression can be specified in the select list when the subquery is not
introduced with EXISTS.`
当我单独运行子查询时,它返回的就很好,所以我假设主查询存在一些问题?
*
帮助我。