I have two tables. The first table has customer_number, item_number. The second has order_number, item_number, customer_number.
I need to get a count of customers by order number for that customer. Meaning, I need to know how many customers and item numbers in the first table came from their first order, or their second order or their third order etc...If there are 15 customers and items, but 10 were ordered on their first visit and five were ordered on their second visit, I think my results would look like:
...but I can't quite get there.