On Wed, Nov 23, 2011 at 11:28 AM, Simon Slavin <slav...@bigfraud.org> wrote:
> On 23 Nov 2011, at 4:17pm, Wiktor Adamski wrote:
>
>> sqlite> select 1 from t order by avg(a); -- should be possible
>
> Why should this be possible ?  For an 'ORDER BY' you need a value for each 
> row.  But aggregate functions produce only one value for the whole SELECT 
> command.

My first reaction was the same. But although it's completely senseless
just syntactically it looks correct - should produce just one row and
thus ORDER BY will be a no-op. And FWIW, this query works as expected
on MS SQL (query with GROUP BY 1 doesn't work though).


Pavel
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to