我有下一个查询
SELECT *
FROM(
SELECT
ID,
SUM(points) AS SUMMARY
FROM my_table
GROUP BY ID
ORDER BY SUMMARY DESC
) t1
WHERE SUMMARY>=(SELECT
SUMMARY
FROM (
SELECT
ID,
SUM(points) AS SUMMARY
FROM my_table
GROUP BY ID
ORDER BY SUMMARY DESC
) t2
WHERE ID=1234)
如何删除重复查询或重用选择结果?也许我的要求完全不正确?