Re: Query Sum problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Larry Sandwick" <lgs@xxxxxxxxxxx>
> 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 .

SELECT status, SUM(cost) FROM Table WHERE status IN ('HELD','OPEN') GROUP BY
status

---John Holmes...

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux