I don't know how to approach this problem.
I have a query
SELECT SUM(Sold_Sum) Sold, Sale_Dt
FROM Sales
WHERE
Dimen = 'D1' AND SaleMonth = 2
GROUP BY Sale_Dt
This query is fine, gives me the Total sales for February
Now I need to get another column, to show the Total sales for March
(I need to display on a graph, to compare)
SELECT SUM(A.Sold_Sum) ASold, SUM(B.Sold_Sum) BSold, Sale_Dt
FROM Sales A, Sales B
as far as I got, not sure how to write the WHERE clause
Can anyone help?
Marika
I have a query
SELECT SUM(Sold_Sum) Sold, Sale_Dt
FROM Sales
WHERE
Dimen = 'D1' AND SaleMonth = 2
GROUP BY Sale_Dt
This query is fine, gives me the Total sales for February
Now I need to get another column, to show the Total sales for March
(I need to display on a graph, to compare)
SELECT SUM(A.Sold_Sum) ASold, SUM(B.Sold_Sum) BSold, Sale_Dt
FROM Sales A, Sales B
as far as I got, not sure how to write the WHERE clause
Can anyone help?
Marika