Products table is as follows:
I want to choose from it categories with the maximum amount of prices. For this, I have the following query option:
select categoryID, sum(Price) from Products group by categoryID having sum(Price) >= all ( select sum(Price) from Products group by categoryID ) But this syntax error comes out:
And if you replace all with max :
select categoryID, sum(Price) from Products group by categoryID having sum(Price) = max ( select sum(Price) from Products group by categoryID ) This is also a syntax error:
Please tell me what I'm doing wrong, and how to fix it. Thank you in advance :)


