Bear with me on this. I am having a brain freeze and can't move forward with this one. I have a table something like this:
IDField SaleDate CustomerID
1 1/1/08 552
2 4/3/07 552
3 12/1/07 552
4 4/3/08 444
5 6/3/07 444
6 2/4/08 444
I need to produce a query to find the IDField number for the latest SaleDate of a customer. In the above sample I would want the result to be:
1
4
So customer number 552 had the last sale date on 1/1/08 and customer 444 had his last sale on 4/3/08.
Obviously something like select max(SaleDate) isn't the option. Should I use an IN statement?
Help@!!!!!
IDField SaleDate CustomerID
1 1/1/08 552
2 4/3/07 552
3 12/1/07 552
4 4/3/08 444
5 6/3/07 444
6 2/4/08 444
I need to produce a query to find the IDField number for the latest SaleDate of a customer. In the above sample I would want the result to be:
1
4
So customer number 552 had the last sale date on 1/1/08 and customer 444 had his last sale on 4/3/08.
Obviously something like select max(SaleDate) isn't the option. Should I use an IN statement?
Help@!!!!!