Fibob Fibob - 8 months ago 22
SQL Question

SQL Basic Query Help! Sum of Sales on Specific date for Specific Products

I need to write a quick bit of code and for the life of me can't work out how to do it - it's been so long since I've had to use SQL, and I've had a mind-lapse.

I need to sum the sales for product A, product B and product C - one total for each product, for

November 27th 2015
(in date format


The basic idea is this

,SUM(SalesQuantity) Sales
FROM TableName
WHERE SalesDate = '2015_11-27'
    AND ProductName IN ('A','B','C')
GROUP BY ProductName

But it all depends on your data structure.

Also, if this is homework then just say. We'd be happy to help you along but doing it for you is not going to help you at all.