Page is a not externally linkable
- Code, Content, and Presentation
-- Databases
---- GROUP BY, returning the highest something per group?


httpwebwitch - 3:44 pm on Mar 8, 2011 (gmt 0)


I know I can do SELECT MAX(number)

but that doesn't return the word column

I'd never noticed this:

SELECT MAX(number),word FROM table GROUP BY letter

returns this:

3 one
5 four

isn't that weird.


Thread source:: http://www.webmasterworld.com/databases_sql_mysql/4278351.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com