> select a from qqq group by b;

This question was discussed on the list a year or 2 ago.

The column a in the simple query above is meaningless; it's
an arbitrary value from each group.  There are queries,
however, where a non-grouped column is meaningful, such as
a join where the grouping column is a foreign key that
references the primary key of another table.

I don't remember whether the '92 std calls this an error,
but later stds allow the dbms to analyze such functional
dependencies to decide whether to accept or reject a query
with a non-grouped column in the column list.  In SQLite
you have to do the functional-dependency analysis yourself.

Regards

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to