On 2 Jul 2010, at 6:06pm, Igor Tandetnik wrote:

> select type_id from foods f1
> where (
>    select count(*) from foods f2
>    where f2.type_id = f1.type_id
>      and f2.rowid < f1.rowid) < 3;

Clever.

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

Reply via email to