Unanswered: Different WHERE filter on different columns
I'm doing a sales report and I was wondering if it's possible to put filters on different columns. I would like column 1 to be the customer name, column 2 sales for 2010, column 3 sales for 2009 and so on...
This is what I have so far, selecting customer and sum and grouping by customer for a certain time period:
SELECT Customer.CustName, SUM(SlsLine.Price) FROM PUB.SlsLine INNER JOIN PUB.SlsOrder ON SlsLine.OrderNum=SlsOrder.OrderNum INNER JOIN PUB.Customer ON SlsOrder.OrdCustNum=Customer.CustNum WHERE SlsLine.IntDlvDate BETWEEN TO_DATE ('01/01/2010') AND TO_DATE ('12/31/2010') GROUP BY Customer.CustName HAVING SUM(SlsLine.Price) > 10000