beennn Posted March 6, 2013 Share Posted March 6, 2013 (edited) I'd like to get the row which has the highest number in one of the columns. I've tried: SELECT * from s where MAX(hw); however I get: ORA-00934: group function is not allowed here Edited March 6, 2013 by beennn Link to comment Share on other sites More sharing options...
justsomeguy Posted March 7, 2013 Share Posted March 7, 2013 Try it this way: SELECT * from s where hw = MAX(hw) or: SELECT * from s where hw IN (SELECT MAX(hw) FROM s) You can also order by that column and only select the first row. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now