Implicit / inferred GROUP BY syntax.

5 views
Skip to first unread message

Martin Blais

unread,
Mar 13, 2018, 8:10:32 PM3/13/18
to Beancount
I just implemented implicitly inferred GROUP BY syntax in the SQL client (bean-query).
This means that if you omit the GROUP BY clause it will automatically infer it to be of the set of non-aggregate columns.
Given the kind of usage this is getting, making it more convenient like this is worthwhile IMO.
You can do something like this, for example:

  > select account, sum(position);

I can't think of any reason this would be a problem.
If you know why SQL normally requires the explicit GROUP BY when it can be inferred automatically, please let me know.

Reply all
Reply to author
Forward
0 new messages