My SQL is quite rusty. I'm using SQL Server Express 2014.
Here's a working query that output a running balance in my transactions table:

```
SELECT Id, AccountId, TrxDate, Amount, SUM(Amount) 
OVER(PARTITION BY ClientId, AccountId ORDER BY TrxDate, Id) AS Balance 
FROM AccountTransaction 
WHERE AccountId=1 ORDER BY TrxDate, ID;

```

This works well to get a valid running balance column. Now, I need to find a way to always count the running balance for the whole table, but only output rows in a date range. If I add a WHERE clause, the OVER() is applied only to the filtered records. So I need a way to execute the OVER() on the whole table, and from these rows, get a subset. 

In a stored procedure, is it possible to go through some rows with a cursor, but based on a criteria sent in a parameter (date interval), only output some of the rows?

Is there another way?