Current query gives me all event_type = 1, for every day after 8/1/2010
I only want the first occurrence per trustee of event_type 1 for each day after 8/1/2010.
SELECT trustee, event_time, event_type
FROM mytable
WHERE event_type = 1
AND event_time > '8/1/2010'
Order BY event_time;
Something like this?
The trick is to group by just the date part of the event_time, ignoring the time-of-day, as well as the trustee.
Within each group, find the first time.
This won’t return a record for a date if there is no data for that trustee on that date.
Update
If you’re using an earlier (pre-2008?) version of SQL Server that doesn’t have a built-in DATE type then you can achieve similar using CONVERT and a suitable style argument that uses only the date part of the datetime (I can’t test this at present, apologies):