如何避免重复的子查询?

时间:2012-05-11 06:13:31

标签: mysql subquery

我正在使用MySql,这是我当前作业的例子:

SELECT a.name, SUM(a.points), (REPEATING_SUBQUERY)
FROM table_1 AS a
GROUP BY a.name
HAVING SUM(a.points) > (REPEATING_SUBQUERY)
OR (REPEATING_SUBQUERY) IS NULL

无论如何都要将'REPEATING_SUBQUERY'设置为参数并加快处理时间?

谢谢!

0 个答案:

没有答案