UnknownGame
01-03-2007, 05:28 PM
Hello,
I need some help with SQL
I have a table with random dates for mulitple accounts between 1990-01-01 and 2007-01-03
For each account, I want to find their latest date before 2005-01-01
Example:
ID | Date
0001 1990-04-14
0001 1994-02-19
0001 2004-12-24
0001 2007-01-01
0002 2001-02-14
0002 2001-11-15
0002 2005-02-03
I want it to pull just the following
0001 2004-12-24
0002 2001-11-15
Can someone direct me in the right direction or what functions I need.
Sorry if it is unclear, I hope the example I made makes it more clear.
Thanks in advanced
-Jeff
I need some help with SQL
I have a table with random dates for mulitple accounts between 1990-01-01 and 2007-01-03
For each account, I want to find their latest date before 2005-01-01
Example:
ID | Date
0001 1990-04-14
0001 1994-02-19
0001 2004-12-24
0001 2007-01-01
0002 2001-02-14
0002 2001-11-15
0002 2005-02-03
I want it to pull just the following
0001 2004-12-24
0002 2001-11-15
Can someone direct me in the right direction or what functions I need.
Sorry if it is unclear, I hope the example I made makes it more clear.
Thanks in advanced
-Jeff
