> if you want to use a field in the SELECT list ... > then that field has to be in the GROUP BY list. > Its an error if you don't.
That's true in std SQL92, but SQLite allows it, as does MySQL, apparently because it makes sense in some circumstances. The value returned for the non-grouped column will be from the group being evaluated, but there's no guarantee which value from the group will be returned. If all the values in the group are the same, then the result will be meaningful, which is the case in the ClientID/ClientDomain query. BTW, SQL99 allows the DBMS to try to infer such functional dependencies between columns and then allow or disallow the non-grouped column. Regards --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]