Let's say I've got this rows in my Oracle database:
N783AS 6 WA N794SW 2 WA N407SW 2 WI N471CA 10 WI N479CA 6 WI N494CA 5 WI N495CA 7 WI N496CA 12 WI N498CA 9 WI N506CA 8 WI N507CA 6 WI What I'd like to obtain is this:
N496CA 12 WI N783AS 6 WA So, what I should do is, somehow, obtain, for each state (third column), the row with the maximum value of the second column. How can I do so?