Order number grouping and count

Last Post 03 Mar 2009 09:14 AM by g8r. 0 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
g8r
New Member
New Member

--
03 Mar 2009 09: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
10___________________1
5____________________2


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

Anyone?

Thanks!
You are not authorized to post a reply.

Acceptable Use Policy