On 05/01/25 17:27, Oon-Ee Ng wrote:
I had a beancount v2 setup working fine, just this weekend I updated to beancount v3. There was an arch-specific hiccup with beanquery not working due to an older version of python-tatsu, but that wasn't too hard to fix.

beanquery requires TatSu >= 5.7.4 < 5.8.0 and this is stated correctly in the package metadata. Installing beanquery like any other Python package should also install the correct version of TatSu. Therefore, I don't understand to what hiccup you are referring to. Didn't

> pip install beanquery

work for you?

The specific issue I'm looking at now is why ORDER BY yearmonth, Account DESC has stopped working (instead it always orders ascending, meaning the latest results are at the bottom).

This is imprecise. "ORDER BY yearmonth, account DESC" was previously interpreted as sorting in descending order for both yearmonth and account. However, this interpretation does not follow the SQL standard. A long time ago, I updated the implementation to follow the SQL standard and apply the DESC ar ASC specifiers only to the sort key immediately preceding them.

But I'd like to be able to solve my queries myself, so wondering whether documentation for this just isn't updated yet.

Documentation is work in progress and contributions are welcomed.

To achieve the desired result you need "ORDER BY yearmonth DESC, account DESC". However, I believe that alphabetical ordering for account names is more common, thus probably you want simply "ORDER BY yearmonth DESC, account".

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 beancount+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/beancount/9a45080b-b0a6-455a-a2b0-dc3232776556%40grinta.net.

Reply via email to