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
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
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,
Hi All,
I have just released PBXT 1.0.11, which I have titled Pre-GA. Going
by our internal tests, and all instances of PBXT in production and
testing by the community this is a GA version!
However, although PBXT has 1000's of instances in production, it is
not used in very diverse
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)
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
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,
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