Hi Guys,
I'm new on this group, and I have a question, is there a way to do a "sum if" (kind of)?
What i want to do is the following.
Select customers.custid, if (sales.itemname = 'candy', sum(sales.count)) as "Sales candies", if (sales.itemname = 'some', sum(sales.count)) as "Sales Some"
from ...
join ...
where .....
group by customers.custid ...
Thanks in advanced, and best regards,
Daniel Hernández.
Tijuana, BC, México.
"More you learn, more you earn".
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
- [SQL] Sum If Daniel Hernandez
- Re: [SQL] Sum If Jim Buttafuoco
- Re: [SQL] Sum If Daniel Hernandez