Thanks Daniele,
FWIW, One thing I dreamed about a long while ago was a change to BQL to
expose the various beancount data as multiple tables, postings,
transactions, balanced, events, and more. I think it's more SQLish
("squealish"?) than the semantics I attached to FROM and TO. What you've
done here is in that spirit, I love it. Thank you!On Fri, Oct 21, 2022 at 6:58 PM Daniele Nicolodi <[email protected]> wrote: > On 19/10/2022 05:09, Triple Z wrote: > > I have tried BQL like `select count(1) from year >= 2022` but I only get > > the number of postings but not transactions. > > > > Any idea to do that? > > If you use beanquery: > > SELECT > count(1) > FROM > #entries > WHERE > type = 'transaction' AND > year >= 2022 > > or > > SELECT count(id) FROM (SELECT DISTINCT id WHERE year >= 2022) > > Both solutions requires a fixes I pushed just a few minutes ago. > > SELECT > count(date) > FROM > #entries > WHERE > type = 'transaction' AND > year >= 2022 > > should work also with a somehow older checkout. > > This reminds me that I need to make COUNT(*) work and that I need to add > a #transactions table (probably after some code reorganization). > > Cheers, > Dan > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/beancount/2a3218c2-a9e2-c905-6194-892a2ee84d1b%40grinta.net > . > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/CAK21%2BhO%2BHtgqVJQPjvRzaEz_fiX%2BEjnBYQLBqDsq5shO8%2BThKw%40mail.gmail.com.
