我发现一组薪水的第50个百分点。如何选择一组数据中前50%的MIN值?这是我失败的语法:
SELECT MIN(SELECT TOP 50 PERCENT [PrimaryCompensationBasis-Amount(USD)])
FROM qryEEGroup;
谢谢!
答案 0 :(得分:2)
尝试使用嵌套的select语句:
SELECT MIN([PrimaryCompensationBasis-Amount(USD))
FROM (SELECT TOP 50 PERCENT [PrimaryCompensationBasis-Amount(USD)] FROM qryEEGroup ORDER BY [PrimaryCompensationBasis-Amount(USD)]) tab;