I have a tabled which looks something like
Date ID Balance
2007-1-1 1 400000
2006-1-1 1 700000
2005-1-1 1 100000
2007-1-1 2 400000
2006-1-1 2 700000
2005-1-1 2 100000
2007-1-1 3 400000
2006-1-1 3 700000
2005-1-1 3 100000
What I need is a row for each ID which is the earliest date given for that ID. In this case:
2005-1-1 1 100000
2005-1-1 2 100000
2005-1-1 3 100000
Any Suggestions, I'm pretty new to SQL
Date ID Balance
2007-1-1 1 400000
2006-1-1 1 700000
2005-1-1 1 100000
2007-1-1 2 400000
2006-1-1 2 700000
2005-1-1 2 100000
2007-1-1 3 400000
2006-1-1 3 700000
2005-1-1 3 100000
What I need is a row for each ID which is the earliest date given for that ID. In this case:
2005-1-1 1 100000
2005-1-1 2 100000
2005-1-1 3 100000
Any Suggestions, I'm pretty new to SQL
Comment