Is there a standard for SQL aggregate function calculation?
问题 Is there a standard on SQL implementaton for multiple calls to the same aggregate function in the same query? For example, consider the following example, based on a popular example schema: SELECT Customer,SUM(OrderPrice) FROM Orders GROUP BY Customer HAVING SUM(OrderPrice)>1000 Presumably, it takes computation time to calculate the value of SUM(OrderPrice). Is this cost incurred for each reference to the aggregate function, or is the result stored for a particular query? Or, is there no