hi...
how do i do conditional sums? like:
select a.job, sum(if b.amount > 0 then amount end if ) from t1 as a left
join t2 as b on a.account=b.accoun where a.account = b.account group by
a.job;
or
select a.job, if b.amount > 0 then sum(b.amount) end if from t1 as a
left join t2 as b on a.account=b.accoun where a.account = b.account
group by a.job;
or something like it. it's be awesome if it can be done...
thanks...
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]