Open devgony opened 2 years ago
I think it would be better to raise an error in such situations. The value of a column not specified in the GROUP BY clause is unpredictable, which could lead to users relying on incorrect behavior. While SQLite has defined this behavior in its official docs, I believe it's a rather confusing specification. (https://www.sqlite.org/lang_select.html#resultset)
If it's okay, I'd like to work on it. 🙂
Currently in gluesql, we can select the columns not appeared in the GROUP BY clause.
GlueSQL 0.8.0
In most databases, Above query throws a error.
Oracle 19.13.0.1.0
Postgres 13.1
Mysql 8.0.26
In Gluesql, should we throw the error or not?
or If there is other opinion, feel free to suggest.
Examples