General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>I need a select sql that returns ONE record per customer, with the max amount for each customer, and the dato of purchase of this max amount.
>
>1 2004/01/02 200
>2 2004/02/05 50
>3 2004/02/01 180
>
>In vfp 7 the next instruction works
>
>select customer,purchase,max(amount) from sales group by customer
>
I just want to point out that this only works in VFP 7 if the records are in the original table in date order. If not, you get bad results.
Tamar
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only