How to select first entry of the day grouped by user in SQL
- by mikepreble
I've looked around and can't quite grasp the whole answer to this SQL query question needed to extract data from an MS Access 2000 table.
Here's an example of what the table [Time Sub] looks like:
CLIENT_ID, DATE_ENTERED, CODE, MINUTES
11111, 5/12/2008 3:50:52 PM, M, 38
11111, 5/12/2008 2:55:50 PM, M, 2
11714, 5/13/2008 1:15:32 PM, M, 28
11111, 5/13/2008 6:15:12 PM, W, 11
11112, 5/12/2008 2:50:52 PM, M, 89
11112, 5/12/2008 5:10:52 PM, M, 9
91112, 5/14/2008 1:10:52 PM, L, 96
11112, 5/12/2008 5:11:52 PM, M, 12
I need to select the first entry of each day per client that's NOT code L or W.
I know this can be done in a SQL statement, but I just can't figure out how. I can get close, but never come up with the right output.
Any help is appreciated.
Thanks,
Mike