Thanks, that works! Harder to do for quarters though, but I think that's a bug in one of the other functions, will start a new thread for that!
On Mon, Feb 24, 2020 at 2:46 PM Red S <[email protected]> wrote: > 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]> 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 > <https://groups.google.com/d/msgid/beancount/8912974e-c7a6-4bb9-9fda-fc91dc014b20%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CAGQ70eumcn01qk8wy0--UTRRXR7vXBMV0Z5MnTEfcRsibd4%2B%2Bg%40mail.gmail.com.
