OPEN DATABASE HOME(2)+"TasTrade\Data\TasTrade" SELECT customer_id, order_date, freight ; FROM orders ; ORDER BY 1 ; INTO CURSOR fullresultThen run the one I posted:
OPEN DATABASE HOME(2)+"TasTrade\Data\TasTrade" SELECT customer_id, MAX(order_date), freight ; FROM orders ; GROUP BY 1 ; INTO CURSOR resultIf you look, you'll see that the Freight field in Result comes from the last record for each customer in date order. Oh, bad example, change MAX() to MIN() and you should get the point.