17,377
社区成员
发帖
与我相关
我的任务
分享
SELECT A.USER_ID, SUM(A.POINTS)AS POINTS
FROM REWARD A, REWARD B
WHERE A.USER_ID = B.USER_ID
AND
(
B.reationDate >= 1232088570051
AND B.creationDate <= 1332088570051
)
GROUP BY A.USER_ID
SELECT userID, sum(Points) AS points
FROM Reward
where
creationDate >= 1232088570051
and creationDate <= 1332088570051 and Points is not null
GROUP BY userID
ORDER BY points DESC