"Pavel Ivanov" <[email protected]> schrieb im Newsbeitrag news:[email protected]...
> > select * from foo f1 where > > (select count(*) from (select distinct b from foo f2 where f1.a = f2.a and f2.b in (...) )) = > > length_of_b_list > > and b in (...); > Shouldn't this be simplified like this? > > select * from foo f1 where > (select count(distinct b) from foo f2 where f1.a = f2.a and f2.b in (...) ) = > length_of_b_list > and b in (...); Just to add another one to the pile, any flaws I overlooked here...? select *, count(b) c_b from foo where b in (...) group by a having c_b = length_of_b_list Olaf _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

