Andras -
If you create an additional table which contains all possible values
for the order_status field, you can do this. Something like this:
create table orderstatus (
statusname varchar(25) );
insert into orderstatus (statusname) values ('pending'),
('processing'), ('shipped');
Next yo
Hello,
I would like merge this 3 query into a single one...
SELECT COUNT(*) AS count FROM orders WHERE order_status = 'pending',
SELECT COUNT(*) AS count FROM orders WHERE order_status = 'processing',
SELECT COUNT(*) AS count FROM orders WHERE order_status = 'shipped',
I could do :
SELECT orde
. Then total number of
records is the last sum-up.
- Original Message -
From: "G r e g L a w r i e" <[EMAIL PROTECTED]>
To: "MySQL Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, August 21, 2001 2:15 PM
Subject: SELECT COUNT(*) question ...
> Howdy all,
&
Howdy all,
I have two tables as described further down below ...
I use the following query to get the data I need ...
sql = "SELECT tblTempConsolidation.*, tblCustomer.customerLibrary FROM
tblCustomer, tblTempConsolidation WHERE tblCustomer.customerId =
tblTempConsolidation.customerId AND tblTe