SELECT account, sum(position)
GROUP BY account
ORDER BY account;
--
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+...@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/CALtzAB280FQqE20Pdkoj%2B7FTa0GCXy8JfDuxmvaNS0Z7ExNGsA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
def root(num_components, account_name):
"""Return the first few components of an account's name.
Args:
num_components: An integer, the number of components to return.
account_name: A string, an account name.
Returns:
A string, the account root up to 'num_components' components.
"""
return join(*(split(account_name)[:num_components]))
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/2edcf0d0-5510-4523-aaa1-97c2658b6014%40googlegroups.com.