Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> SQL Blues......Part 2 HELP!!!
Okay, I've tried about everything....I've taken everyone's advice (albeit conflicting) one at a time, and still to no avail.
I am trying to retrieve the top values (determined by actual_points) from a table (catch_entries) for each individual player. ie: bill's top score, mike's top score, jim's top score, etc.
Here is the most recent form of my select statement, which returns only one value - the highest actual_point value overall.
What do I need to do to make it return the highest actual_points value per user?????
SELECT ce.pin as pin, ce.date_caught as date_caught,
sp.name as specie_name, st.name as state_name, INITCAP(players.first_name ||' '|| players.last_name) as player_name, ce.specie_length as specie_length, ce.adjusted_points as adjusted_points, ce.actual_points as actual_points FROM dogfish.catch_entries ce, dogfish.species sp, dogfish.states st, dogfish.playersWHERE ce.specie_id = sp.specie_id
FROM dogfish.states WHERE region_id = in_region ) AND actual_points = ( SELECT MAX(actual_points) FROM catch_entries ce1 WHERE ce1.pin = pin)ORDER BY ce.actual_points DESC
Thanks for any help.....I really appreciate it.
-- MhReceived on Wed Jul 05 2000 - 00:00:00 CDT
![]() |
![]() |