inZania <z...@claes.biz> wrote:
> Igor Tandetnik wrote:
>>
>> select * from objects where
>> object_id in (select object_id from properties where
>> property_name='green' and score > 3) and
>> object_id in (select object_id from properties where
>> property_name='hot' and score < 2) and
>> object_id in (select object_id from properties where
>> property_name='bright' and score > 0);
>
> Thanks for the help!  However, I'm running into an error with the
> sub-queries returning more than 1 result.  I suppose it has to do
> with the fact that the property "hot" may have more than 1 entry (one
> for each object).  Thanks!

I'm not sure I understand. Why do you believe it's an error for 
subqueries here to return more than one result? Do you understand how IN 
operator works?

Igor Tandetnik 



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

Reply via email to