Did you try:
> help targets
Listed there is YMONTH():
SELECT
YMONTH(date), account, sum(cost(position))
WHERE
account ~ 'Assets:Banking:Institution:*'
and joinstr(other_accounts) ~ 'Liabilities:CreditCards'
GROUP BY YMONTH(date), account
ORDER BY YMONTH(date), account DESC
On Sunday, February 23, 2020 at 9:05:10 PM UTC-8, Oon-Ee Ng wrote:
>
> Anyone?
>
> On Sat, Feb 15, 2020 at 9:31 AM Oon-Ee Ng <[email protected]
> <javascript:>> wrote:
>
>> I have this query:-
>>
>> SELECT
>> year, month, account, sum(cost(position))
>> WHERE
>> account ~ 'Assets:Banking:Institution:*'
>> and joinstr(other_accounts) ~ 'Liabilities:CreditCards'
>> GROUP BY year, month, account
>> ORDER BY year, month, account DESC
>>
>> Works just peachy, and returns 4 columns. Can I merge year and month into
>> one column? So instead of having (2020, 02) followed by (2020, 01) I'd like
>> (2020-02) followed by (2020-01) etc.
>>
>> Reason is because I'd like to use fava's nifty new 'graph-from-query'
>> feature =)
>>
>
--
You received this message because you are subscribed to the Google Groups
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beancount/8912974e-c7a6-4bb9-9fda-fc91dc014b20%40googlegroups.com.