On Wednesday, August 17, 2022 at 11:43:32 AM UTC-7 [email protected] wrote:
> On 17/08/2022 07:00, Red S wrote: > > I would encourage you to go through the bql documentation, and > > specifically understand querying transactions vs. postings (FROM vs > > WHERE in bql terminology). > > The capability to use the FROM clause of a BQL query to filter ledger > entries is an unfortunate historical accident. There is no fundamental > difference between the expression that are used in the FROM clause and > in the WHERE clause, except for which table columns are accessible in > the two: the FROM clause has access only to columns derived from > transactions properties, while the WHERE clause has also access to > columns derived from posting properties: In this thread, the OP was using a transaction-level solution (tags), and perhaps executing or viewing the equivalent of "SELECT * FROM/WHERE YEAR=2022" which matches some tags. And ending up with postings from all sides of the transaction, leading to a balance sum of zero, which confused them. So at a higher level, I was pointing the OP to thinking about the distinction between transactions and postings, which seems to be a a not-uncommon stumbling block. But thanks for the context about FROM/WHERE and where that's headed. Makes sense, and removing FROM might also reduce a point of confusion, IMHO. -- 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/05fba31f-ecc5-4ab2-91e3-2885dd09f4e8n%40googlegroups.com.
