Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> HELP! Group By will only allow 2 fields.....Why?
My query will only allow 2 fields when I have a GROUP BY condition at the
end....why?
For Example:
"SELECT pin, max(actual_points)
FROM catch_entries GROUP BY pin ORDER BY max(actual_points) DESC" Works just fine......but when I do this:I get an error message :
"SELECT pin, max(actual_points), adjusted_points
FROM catch_entries GROUP BY pin ORDER BY max(actual_points) DESC"
Why is this? it seems pretty simple..... Here's the whole query I am trying to get working :
SELECT ce.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, max(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 )GROUP BY ce.pin
The idea is to return the highest value(actual_points) per player as only 1 is allowed per player.
Thanks a lot....I do appreciate all help that is offered.....
-- MhReceived on Thu Jul 06 2000 - 00:00:00 CDT
![]() |
![]() |