FINDFIRST and other_accounts are useful for this.
SELECT * WHERE account ~ "Assets:Banks:Checking" AND
STR(FINDFIRST('Liabilities:CreditCard.*', other_accounts)) != 'None'
On Thursday, July 3, 2025 at 8:58:14 AM UTC-7 [email protected] wrote:
> I'd like to list all transfers between two accounts. For example, to
> estimate monthly credit card payments.
>
> I've tried,
>
> bean-query bc.bean "SELECT date, payee, narration WHERE account ~
> 'Assets:foo:bar' AND account ~ 'Liabilities:foo:baz'"
>
> But it returns nothing (because account is one thing, and cannot be an AND
> of two things). Can someone help me with this query? I tried ChatGPT and it
> was not helpful.
>
> Thanks,
>
> -k.
>
--
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 visit
https://groups.google.com/d/msgid/beancount/d4ac99ab-c83b-46c9-b4bd-bb8378bc5c12n%40googlegroups.com.