Its a little unclear what youre getting after... ill assume (Site, date-time) is unique, and you want to group by each (day, pct).Try this:declare @table table (site varchar(25), dt datetime, pct numeric(12,8))insert into @table (site, dt, pct) select 'omahmwi1', '2006-08-03 22:00:00.000', '37.80000000' union all select 'omahmwi1', '2006-08-04 06:00:00.000', '37.80000000' union all select 'omahmwi1', '2006-08-05 02:30:00.000', '37.80000000' union all select 'omahmwi1', '2006-08-06 09:30:00.000', '37.78571400' union all select 'omahmwi1', '2006-08-07 00:00:00.000', '37.78571400' union all select 'omahmwi1', '2006-08-08 04:00:00.000', '37.81428500' union all select 'omahmwi1', '2006-08-08 06:30:00.000', '37.81428500' union all select 'omahmwi1', '2006-08-09 15:30:00.000', '37.81428500' union all select 'omahmwi1', '2006-08-10 05:45:00.000', '37.82857100' union all select 'omahmwi1', '2006-08-11 08:45:00.000', '37.74285700'select t.site, max(t.dt), t.pctfrom @table tgroup by t.site, t.pct, convert(varchar, t.dt, 101)order by 2
Nathan Skerl