I'm not sure if this is a bug or intended behaviour, so seeking advise here first.
SELECT QUARTER(date) as quarter, last(balance)
FROM date > 2017-12-31
WHERE account ~ 'Assets:Banking|Assets:Cash'
GROUP BY quarter
ORDER BY quarter, DESC
What it returns is the balances assuming that it starts at a balance of 0 on 2018-01-01 (which makes sense I guess) but what I'm looking for with the FROM date > 2017-12-31 is to only return results from that period of time. Something similar to what fava does when you place '2018' into the 'Time' box.
So for example if my banking accounts and cash had 5000 on the first of January and 2000 now, the query above would return -3000. I'd like it to return 2000 (which it does if I remove the FROM, but also returns all my 13 years of accounting history...)