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. --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php