I have two tables

```
-----Dates-----          ------Sales------
Date    | Month          Date    | Quantity
---------------          ------------------
09/06/16| Jun            09/06/16| 2
09/07/16| Jul            15/07/16| 11
19/09/16| Sep            19/09/16| 12
21/09/16| Sep            09/07/16| 33
17/11/16| Nov            21/09/16| 45

```

I need to write an SQL query to calculate the running total of the sales in every month

Can I do it this way?

```
SELECT Month,
(SELECT SUM(Quantity) FROM Sales WHERE Month<=Dates.Month)
FROM Dates, Sales
WHERE Dates.Date = Sales.Date
ORDER BY Month

```

I feel there's something wrong in my way of thinking, but I don't have a database to prove it