Hello,

I'm trying to run queries via automation, but I cannot tell how to use the 
beanquery package

this is what I have

import beanquery

query = '''SELECT sum(position)
WHERE date <= 2024-04-01
  AND account ~ "Assets:MyAsset"'''

file_path = "path/to/file.beancount"

connection = beanquery.connect('beancount:' +  file_path )
result = connection.execute(query) 
print( result .fetchall())

the problem is that the result contains all the entries that match the 
WHERE clause, but they are not aggregated as I specified in the query

What am I missing?

-- 
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/6ca313b9-f417-4589-9dc2-eaa8ce22e27en%40googlegroups.com.

Reply via email to