Order number grouping and count

Last Post 03 Mar 2009 08:14 AM by g8r. 0 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
New Member
New Member

03 Mar 2009 08:14 AM
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:

customers____________ vist_when_order_was_placed

...but I can't quite get there.



Acceptable Use Policy