List:General Discussion« Previous MessageNext Message »
From:Keith Clark Date:May 12 2010 2:13pm
Subject:Re: Count Query question
View as plain text  
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,
 `products_date_added` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
 `products_last_modified` datetime DEFAULT '2008-10-01 00:00:00',
 `products_date_available` datetime DEFAULT '2008-10-01 00:00:00',
 `products_weight` decimal(5,2) DEFAULT '0.50',
 `products_status` tinyint(1) NOT NULL DEFAULT '1',
 `products_tax_class_id` int(11) DEFAULT '1',
 `manufacturers_id` int(11) DEFAULT NULL,
 `products_ordered` int(11) DEFAULT '0',
 `products_format` varchar(20) DEFAULT NULL,
 `abebooks_price` decimal(15,4) DEFAULT NULL,
 PRIMARY KEY (`products_id`,`products_model`),
 UNIQUE KEY `products_model` (`products_model`),
 KEY `idx_products_date_added` (`products_date_added`),
 KEY `manufacturers_id` (`manufacturers_id`)
) ENGINE=MyISAM AUTO_INCREMENT=17418 DEFAULT CHARSET=latin1

So, I'd like to create a report that grouped by products_date_available,
counts all records before products_date_available with a
products_quantity>0.




Thread
Count Query questionKeith Clark12 May
  • Re: Count Query questionChris W12 May
    • Re: Count Query questionKeith Clark12 May
      • Re: Count Query questionKeith Clark12 May
        • Re: Count Query questionBob Cole13 May
          • Re: Count Query questionKeith Clark13 May
            • Re: Count Query questionBob Cole13 May
              • Re: Count Query questionKeith Clark13 May
                • RE: Count Query questionwebmaster13 May