Incorrect reformulation with multiple aggregates
Closed this issue · 1 comments
Felerius commented
Example:
SELECT *
FROM customer
WHERE c_acctbal > (
SELECT SUM(a.x)
FROM (
SELECT AVG(o_totalprice) AS x
FROM orders
WHERE o_custkey = c_custkey
GROUP BY o_orderpriority
) AS a
)
(copy-paste for hyriseConsole: SELECT * FROM customer WHERE c_acctbal > (SELECT SUM(a.x) FROM (SELECT AVG(o_totalprice) AS x FROM orders WHERE o_custkey = c_custkey GROUP BY o_orderpriority) AS a)
)