Hi, I thought "distinct(column)" is somewhat same as "group by column". I devised the query in steps and forgot to take away the distinct part.
thanks, Gunnar On 09/29/2015 09:37 AM, Clemens Ladisch wrote: > gunnar wrote: >> select distinct(server_order_id), count(*) from ... group by server_order_id >> ... > Please note that DISTINCT does not work this way; it always applies to > all expressions in the SELECT clause, and "(server_order_id)" is just > the same as "server_order_id". The query actually works because the > GROUP BY already ensures that all values are distinct. > > > Regards, > Clemens > _______________________________________________ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users >