As an FYI, in the Beancount query language, you express this using COUNT():
beancount> select year(date), month(date), account, count(position) where account ~ 'Expenses:Piano' group by 1, 2, 3 order by 1, 2, 3; I haven't merged it into the default branch yet, but I'm working on documenting it right now in order to merge it and make it available. On Sun, Jan 4, 2015 at 2:09 PM, Craig Earls <[email protected]> wrote: > I don't know of any way to do this. > > On Sat, Jan 3, 2015 at 4:51 AM, Ivanov Dmitry <[email protected]> wrote: > >> Suppose, I am attending piano lessons, and have the following ledger file: >> >> --------------------------------------------- >> 2014/01/02 * Piano lesson >> Expenses:Piano $30 >> Assets:Cash >> >> 2014/02/02 * Piano lesson >> Expenses:Piano $30 >> Assets:Cash >> >> 2014/03/02 * Piano lesson >> Expenses:Piano $30 >> Assets:Cash >> >> 2014/04/02 * Piano lesson >> Expenses:Piano $30 >> Assets:Cash >> >> 2014/04/12 * Piano lesson >> Expenses:Piano $30 >> Assets:Cash >> --------------------------------------------- >> >> Then I run a register report to see monthly statistics: ledger >> --date-format %m -f test.txt --monthly register Expenses:Piano >> >> I get this: >> >> 01 - 01 Expenses:Piano $30 >> $30 >> 02 - 02 Expenses:Piano $30 >> $60 >> 03 - 03 Expenses:Piano $30 >> $90 >> 04 - 04 Expenses:Piano $60 >> $150 >> >> Is it possible to show 2 new columns: >> 1. number of transactions >> 2. growing number of transactions? >> >> So, I could know, how many lessons I attended each month. Like this: >> >> >> 01 - 01 Expenses:Piano $30 >> $30 1 1 >> 02 - 02 Expenses:Piano $30 >> $60 1 2 >> 03 - 03 Expenses:Piano $30 >> $90 1 3 >> 04 - 04 Expenses:Piano $60 >> $150 2 5 >> >> -- >> >> --- >> You received this message because you are subscribed to the Google Groups >> "Ledger" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Craig, Corona De Tucson, AZ > enderw88.wordpress.com > > -- > > --- > You received this message because you are subscribed to the Google Groups > "Ledger" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
