Kind of new to SQL here. Had a quick question, I am running the following script
SELECT entry, itemLevel, COUNT(*)
FROM spell_item_scaling
GROUP BY entry, itemLevel;
Right now its sorts results by entry and itemlevel into something like this:
Entry ItemLevel COUNT
88 11 1
88 22 1
88 30 4
91 18 2
91 30 3
94 24 2
94 30 2
94 40 1
I then created a new table with the data from the above query. Now I want to run another query that will only display the rows with the highest "Count" so in the example above, it would only show the row with Count = 4 for Entry 88. And the row with Count 3 for 91. For entry 94, since there are multiple highest counts with the same count, then it could either show both or show one or the other. I have tried achieving this with a Max Function, and a distinct funtion, but to no avail. Thank you for the help in advance!