Hello:
I am trying to create a SELECT statement in which it queries 1 table that has a whole bunch of fields with users and their timestamps during a day. A user can have many timestamps during 1 day. All I would like to pick is the earliest time for a day.
So, let's say my table looks like this:
ID User Time
1 1001 10/1/2003 7:49:00AM
2 1002 10/1/2003 8:00:00AM
3 1002 10/1/2003 8:32:00AM
4 1001 10/1/2003 9:00:00AM
5 1001 10/1/2003 11:00:00AM
So it should return is:
User Time
1001 10/1/2003 7:49:00AM
1002 10/1/2003 8:00:00AM
I tried something like this:
Select User, Time
From TableTime
Where Time = (Select MIN(time) from TableTime)...?
and many other combinations I've tried as well but I can't seem to get it. Your help will be greatly appreciated.
I am trying to create a SELECT statement in which it queries 1 table that has a whole bunch of fields with users and their timestamps during a day. A user can have many timestamps during 1 day. All I would like to pick is the earliest time for a day.
So, let's say my table looks like this:
ID User Time
1 1001 10/1/2003 7:49:00AM
2 1002 10/1/2003 8:00:00AM
3 1002 10/1/2003 8:32:00AM
4 1001 10/1/2003 9:00:00AM
5 1001 10/1/2003 11:00:00AM
So it should return is:
User Time
1001 10/1/2003 7:49:00AM
1002 10/1/2003 8:00:00AM
I tried something like this:
Select User, Time
From TableTime
Where Time = (Select MIN(time) from TableTime)...?
and many other combinations I've tried as well but I can't seem to get it. Your help will be greatly appreciated.