On Tue, Jan 6, 2015 at 5:21 AM, Ivanov Dmitry <[email protected]> wrote:

> Martin Blais:
>>
>> 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.
>>
>
> It would be fantastic to combine the power of SQL and flexibility of
> ledger files.
>

I've merged the SQL client two days ago on the 'default' branch of
Beancount.
Doc is here:
http://furius.ca/beancount/doc/query

An approach I would recommend is to convert your input file to Beancount,
which provides the benefit of inventory booking checks (it's more strict)
and dated balance assertions (you don't have to worry about file ordering).
>From there, you can then automatically convert that file into Ledger format
equivalent and use the reports you've become accustomed to. This way you
get both set of tools and a much tighter input file with less errors. I'm
seeing a few users take this road now.

Or... you could port my SQL client to use Ledger's Python interface. I
don't think it would be very difficult. It might even be possible to
support both backends without forking it.

Cheers,

-- 

--- 
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.

Reply via email to