日期:2014-05-17 浏览次数:20511 次
--呵呵,上面又少了東西,以下面為准
SELECT *
FROM ta
WHERE PoliceName=
(
SELECT TOP 1 PoliceName
FROM
(
SELECT PoliceName,SUM(FineMoney) FineMoney
FROM ta
WHERE FineDate='2006-07-05'
group by PoliceName
) a
ORDER BY FineMoney DESC
)
and FineDate='2006-07-05'