List:General Discussion« Previous MessageNext Message »
From:rory oconnor Date:April 5 2002 11:14pm
Subject:Abandoned Cart Query
View as plain text  
I'm trying to write a query that will tell me how many abandoned carts
there are in a "cart" table I have.

each item in a cart is a record, so simply querying on records won't
work.  What I need to count is how many distinct customerId's there
are.  a sample from the table looks like:

cartItemId	customerId	productId
1944		244		2139
1945		244		2234
1946		244		8291
1947		198		4435
1948		198		3342
1949		221		3324
1950		221		4432

so in this example, the number of abandoned carts would be 3, because
there are only three unique customerId's.

Any help on what that query would look like is appreciated!  

Thanks,

Rory

P.S. This list is awesome!  you guys have helped me immensely.

Thread
Abandoned Cart Queryrory oconnor6 Apr
  • Re: Abandoned Cart QueryScott Gifford6 Apr