Re: Count Query question

2010-05-13 Thread Keith Clark
Bob, Here are a few rows of my data: 17462, 0, '0929998596', '/GraphicNovels/0929998596.jpg', '8.5000', '2010-05-12 19:02:47', '2008-10-01 00:00:00', '2008-10-01 00:00:00', '0.50', 1, 1, 7429, 0, '1', 17461, 1, '1561481912', '/Cooking/1561481912.jpg', '3.', '2010-05-12 19:00:17',

RE: Count Query question

2010-05-13 Thread webmaster
: Keith Clark [mailto:keithcl...@k-wbookworm.com] Sent: 13 May 2010 14:11 To: mysql@lists.mysql.com Subject: Re: Count Query question Bob, Here are a few rows of my data: 17462, 0, '0929998596', '/GraphicNovels/0929998596.jpg', '8.5000', '2010-05-12 19:02:47', '2008-10-01 00:00:00', '2008-10-01 00:00

Re: Count Query question

2010-05-12 Thread Chris W
With out the table definitions, I'm not sure how anyone could help. Can you send the output of show create table for each of the tables involved in this query? Chris W Keith Clark wrote: I'm trying to produce a report that will tell me how many products were available with a Quantity0

Re: Count Query question

2010-05-12 Thread Keith Clark
Chris, Here is my full table definition: CREATE TABLE `products` ( `products_id` int(15) NOT NULL AUTO_INCREMENT, `products_quantity` int(4) NOT NULL, `products_model` varchar(15) NOT NULL DEFAULT '', `products_image` varchar(64) DEFAULT NULL, `products_price` decimal(15,4) DEFAULT NULL,

Re: Count Query question

2010-05-12 Thread Keith Clark
On Wed, 2010-05-12 at 10:13 -0400, Keith Clark wrote: Chris, Here is my full table definition: CREATE TABLE `products` ( `products_id` int(15) NOT NULL AUTO_INCREMENT, `products_quantity` int(4) NOT NULL, `products_model` varchar(15) NOT NULL DEFAULT '', `products_image` varchar(64)

Re: Count Query question

2010-05-12 Thread Bob Cole
Keith: Does this work? SELECT products_date_available, COUNT(products_quantity) FROM products WHERE products_quantity 0 GROUP BY products_date_available Hope this helps, Bob On May 12, 2010, at 3:06 PM, Keith Clark wrote: On Wed, 2010-05-12 at 10:13 -0400, Keith Clark

Re: Count Query question

2010-05-12 Thread Keith Clark
Hi Bob, No, actually it does not. I'm looking for the count of items. From your query example I only get two rows. This table has over 2 1/2 years of daily sales data. Maybe I'm not stating my question correctly...h Thanks for responding though, greatly appreciated. Keith On Wed,

Re: Count Query question

2010-05-12 Thread Bob Cole
Kevin: I assumed the following data: products_id products_date_available products_quantity 11 2010-05-01 1 11 2010-05-02 0 11 2010-05-03 3 11 2010-05-04 3 11 2010-05-05 3 11 2010-05-06 1 11 2010-05-07 0 11 2010-05-08