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

Count Query question

2010-05-12 Thread Keith Clark
I'm trying to produce a report that will tell me how many products were available with a Quantity0 before a certain date, and have that ordered by date. Table: Date Quantity Result desired DateQuantity Available May 1 5000 May 2 5050 May 3 5075 Thanks, Keith -- MySQL General

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

Newbie group/count query question

2001-05-01 Thread Graham Nichols
I have a table which contains a date column and an order_number column. I need to formulate a query syntax to return the total number of orders for each day in a given month (if any). Can someone help me with the syntax please as I've been stumbling around with it all day without success. Many

RE: Newbie group/count query question

2001-05-01 Thread Ravi Raman
where MONTH(date) = 4 to limit the rows to all days in april, for example. hth. -ravi. -Original Message- From: Graham Nichols [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 01, 2001 11:23 AM To: [EMAIL PROTECTED] Subject: Newbie group/count query question I have a table which

Re: Newbie group/count query question

2001-05-01 Thread Thalis A. Kalfigopoulos
On Tue, 1 May 2001, Graham Nichols wrote: I have a table which contains a date column and an order_number column. I need to formulate a query syntax to return the total number of orders for each day in a given month (if any). Can someone help me with the syntax please as I've been stumbling