Re: How to find persons who like red fruits or crunchy veggies?

From: <kvnkrkptrck_at_gmail.com>
Date: 15 Nov 2006 11:48:13 -0800
Message-ID: <1163620093.138081.123840_at_m7g2000cwm.googlegroups.com>


In your language, can you query:
How many fruit colors are there? Which fruit color(s) is/are the most liked? How many veggies are there that nobody likes?

Neo wrote:
> The following dbd query finds persons who like either red fruits or
> crunchy veggies:
>
> (and (select person instance *)
> (select * like (or (and (select fruit instance *)
> (select * color red))
> (and (select veggie instance *)
> (select * texture crunchy))
> )
> )
> )
>
> What RMDB schema and SQL query will find the equivalent? Should I start
> with T_Person, T_Fruit, T_Veggie, T_PLikeF, T_PLikeV ?
Received on Wed Nov 15 2006 - 20:48:13 CET

Original text of this message