What do these transactions look like in beancount syntax?

— 
Brian Lalor (he/him)
bla...@bravo5.org

> On Oct 24, 2024, at 10:07 AM, Daniel Schultz <sli...@gmail.com> wrote:
> 
> Hello all,
> 
> I'm generating a campaign finance report, which means I need to load any 
> journal entries for accounts whose *total balance* exceeds $50.00
> 
> I figure this is not going to be possible via BQL directly but figured it 
> cannot hurt to ask.
> 
> The query I would love to use is something along the lines of:
> 
> ```
>   SELECT
>     account,
>     date,
>     position,
>     getitem(open_meta(account), 'pac_name') AS pac_name,
>     getitem(open_meta(account), 'address') AS address,
>     getitem(open_meta(account), 'city') AS city,
>     getitem(open_meta(account), 'state') AS state,
>     getitem(open_meta(account), 'zip') AS zip,
>     getitem(open_meta(account), 'country') AS country,
>     getitem(open_meta(account), 'email') AS email,
>     getitem(open_meta(account), 'phone') AS phone
>   WHERE account ~ 'Income:Contributions'
>   AND getitem(open_meta(account), 'pac_name') != ''
>   AND account IN (
>     SELECT account
>     WHERE abs(sum(position)) > 50
>   )
>   ORDER BY date
> ```
> 
> This doesn't appear to work and I believe that is because subqueries are not 
> actually a thing in BQL.  Are there any query tools that might help be 
> achieve this goal?
> 
> Best,
>  - Dan
> 
> -- 
> 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 beancount+unsubscr...@googlegroups.com 
> <mailto:beancount+unsubscr...@googlegroups.com>.
> To view this discussion visit 
> https://groups.google.com/d/msgid/beancount/1a6a706f-c95c-4e5b-a607-5c94c3d43325n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/beancount/1a6a706f-c95c-4e5b-a607-5c94c3d43325n%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 beancount+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/beancount/570B91DB-6178-4A6D-AE3E-3CFBBBE70EE4%40bravo5.org.

Reply via email to