Example Beancount file ▾Query

SELECT     units(sum(position)) as units,     cost(sum(position)) as book_value,     value(sum(position)) as market_value   WHERE account_sortkey(account) ~ "^[01]"   GROUP BY cost_currency   ORDER BY cost_currency
SELECT     units(sum(position)) as units,     cost(sum(position)) as book_value,     value(sum(position)) as market_value   WHERE account_sortkey(account) ~ "^[01]"   GROUP BY currency, cost_currency   ORDER BY currency, cost_currency
SELECT account,     units(sum(position)) as units,     cost(sum(position)) as book_value,     value(sum(position)) as market_value   WHERE account_sortkey(account) ~ "^[01]"   GROUP BY account, cost_currency, account_sortkey(account)   ORDER BY account_sortkey(account)
SELECT account,     units(sum(position)) as units,     cost_number as cost,     first(getprice(currency, cost_currency)) as price,     cost(sum(position)) as book_value,     value(sum(position)) as market_value,     cost_date as acquisition_date   WHERE account_sortkey(account) ~ "^[01]"   GROUP BY account, cost_date, currency, cost_currency, cost_number, account_sortkey(account)   ORDER BY account_sortkey(account)
SELECT account, count(account) GROUP BY account ORDER BY account
select account, balance

Upload file(s):

New transaction: