Hi
Is it possible to have a sql that gets x amount of rows for each group by
For example:
Get the 3 latest prices that we charged customers for all items sold:
Customer Item Price
abc 123 5.00
abc 123 6.00
abc 123 7.00
cba 321 5.00
cba 321 7.00
cba 321 8.00
xxx 123 10.00
xxx 123 11.00
xxx 123 12.00
I have a date to for each sale that I must use to establish what is the latest but how can I limit to show only 3 for each customer-item
Thank you for any response
Is it possible to have a sql that gets x amount of rows for each group by
For example:
Get the 3 latest prices that we charged customers for all items sold:
Customer Item Price
abc 123 5.00
abc 123 6.00
abc 123 7.00
cba 321 5.00
cba 321 7.00
cba 321 8.00
xxx 123 10.00
xxx 123 11.00
xxx 123 12.00
I have a date to for each sale that I must use to establish what is the latest but how can I limit to show only 3 for each customer-item
Thank you for any response