Re: SQL Query help needed
Posted in 1996
Brett Bailie — — source: Informix-list mailing list archive (1991-1998)
Sorry, that last SQL wasn't quite what was being asked for.
Try this one:
select t1.hour
from tbl t1
where t1.value = (
select max(value)
from tbl
where name = t1.name
and date = t1.date
)
This SQL selects the hour from any row that has a value equal to the
maximum for its name and date.
--
Brett Bailie Ingres DBA Sydney
bailieb@hutch.com.au NSW Supply NSW 2010
+61 2 339 7841 Dept Public Works Australia
Any opinions or ignorances expressed are unlikely those of my employer!