Thread:Semantic-mediawiki.org:Community portal/How to create advanced queries with a series of AND/OR's?

How would one create a query like this: get a list of persons where the hair color is brown or black and eye color is blue or green?

The reason im asking this is because im unsure of how precedence is handled in these queries. For example if i wrote:


 * ask: Hair color::brown OR Hair color::black Eye color::blue OR Eye color::green

Would the above query actually be correct? would smw group the logic as: ((hair = brown or black) and (eyes = blue or green)) or would the logic be grouped as: (hair = brown or (hair=black and eyes=blue) or eyes = green)?