Skip to content
Advertisement

Query HAVING MAX() doesn’t work as expected

I have four tables in a database. the tables are like the following:

I want to select category name with the highest number of purchase. Here’s what I’ve done so far, but I couldn’t get the result that i want

Advertisement

Answer

Presumably, you want something like this:

Never use commas in the FROM clause. Always use proper, explicit, standard JOIN syntax.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement