On 25/02/24 18:58, CDT wrote:
> This command gives me a list of the different purchases of that position
> at different prices. So if I bought some Filecoin at $5.77 and other at
> $7.83 (just as an example) it separates each of them out in the output
> 1.134 FIL {5.77 USD}, 3.345 FIL {7.83 USD}. Is there a way to get the
> total number of shares across all accounts regardless of price (or maybe
> with an average price)?
>
> I see where I can get a sum total of the amount I spent on a position by
> using SELECT sum(cost(position)) but I don't see anything on getting a
> total number of a specific commodity (as a total).
SELECT sum(units(position))
or
SELECT sum(position.units)
The latter works only with a somewhat recent beanquery (unreleased).
Cheers,
Dan