"Jay Sprenkle" <[EMAIL PROTECTED]> wrote: > > Works ok here: > > C:\Temp\sqliteImport>sqlite3 > SQLite version 3.0.8 > Enter ".help" for instructions > sqlite> create table t (a); > sqlite> select * from (select count(a) as b from t) where b > 1; > sqlite> select count(a) as b from t where b > 1; > 0 > sqlite>
No, it doesn't work ok. Count(a) (aka b) is zero, so if the where clause were applied there would be no result. The problem is that it's not valid sql. Version 3.3.3 throws an error (misuse of aggregate) instead of segfaulting. Regards

