goofaholix
MIS
I'm sure there must a way to do this as one select statement but it escapes me.
What I need to do is select that latest record for each customer based on date.
What I've been doing is creating a View that selects customer, max(date) from table1 grouped by customer, then joining that to table1 on date and customer to pull out the latest record.
Is there a way to do that on the fly as one select?
Thanks.
What I need to do is select that latest record for each customer based on date.
What I've been doing is creating a View that selects customer, max(date) from table1 grouped by customer, then joining that to table1 on date and customer to pull out the latest record.
Is there a way to do that on the fly as one select?
Thanks.