Query Problem
| From: | Larry Sandwick | Date: | Tue, 16 Dec 2003 19:41:25 +0000 |
| Subject: | Query Problem | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-32084@lists.php.net to get a copy of this message | ||
I need to sum the field *COST* in this query where data in *STATUS* is
equal to "HELD" and "OPEN", so I will have 2 totals passed below and do
not know where to begin .
All information is in 1 table.
Original query
select distinct(Company_name), account, City, State from table where
number = 100
I need to be able to pull the $$ amount totals by company name for
status equal to HELD and OPEN .
Result
Company A OPEN HELD
1233 100.00 50.00
Any suggestion would be appreciated.
Larry Sandwick
Larry Sandwick
Sarreid, Ltd.
Network/System Administrator
phone: (252) 291-1414 x223
fax : (252) 237-1592