I need some help on list manipulation...
Below is an example of some data from our orders database: -
customer1
order_no_1 date1 product_a value
order_no_1 date1 product_b value
order_no_1 date1 product_c value
order_no_2 date2 product_a value
order_no_2 date2 product_d value
order_no_3 date3 prosuct_a value
order_no_3 date3 product_b value
order_no_3 date3 product_c value
customer2
order_no_1 date4 product_z value
etc etc
for each customer I want to be able to find all the products for the latest order by date.
I can do this on an individual basis but can't work out how to do it for all customers in one go.
Also it would be nice, but not essential, to find a customers average order value.
Thanks in advance for any help or advice
Below is an example of some data from our orders database: -
customer1
order_no_1 date1 product_a value
order_no_1 date1 product_b value
order_no_1 date1 product_c value
order_no_2 date2 product_a value
order_no_2 date2 product_d value
order_no_3 date3 prosuct_a value
order_no_3 date3 product_b value
order_no_3 date3 product_c value
customer2
order_no_1 date4 product_z value
etc etc
for each customer I want to be able to find all the products for the latest order by date.
I can do this on an individual basis but can't work out how to do it for all customers in one go.
Also it would be nice, but not essential, to find a customers average order value.
Thanks in advance for any help or advice