Page is a not externally linkable
- Code, Content, and Presentation
-- Databases
---- MySQl GROUP BY Issue


Demaestro - 5:37 pm on Jul 28, 2008 (gmt 0)


Ok I think I have it.... this works in Postgres anyways.

select
tbl.*
from
tbl,
(select max(int_time) as int_time, file_name from tbl group by file_name) as max_times
where
tbl.folder = 'docs'
and max_times.int_time = tbl.int_time
and max_times.file_name = tbl.file_name

[edited by: Demaestro at 5:39 pm (utc) on July 28, 2008]


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