I cant seem to see why this query is failing, in my group by clause I have the columns that are in my select yet im still getting the error. Why is this? Below is my query;
SELECT c.customer_first_name, c.customer_last_name, MAX(SUM(cost_line))
FROM customers c LEFT OUTER JOIN orders o USING(customer_numb)
LEFT OUTER JOIN order_lines l USING (order_numb)
GROUP BY c.customer_first_name, c.customer_last_name
ORDER BY customer_numb;
getting this error
SQL Error: ORA-00937: not a single-group group function
00937. 00000 - "not a single-group group function"