How would one create a query like this the following?
get a list of persons where the hair color is brown or black and eye color is blue or green.
The reason i'm asking this is because i'm unsure of how precedence is handled in these queries.
For example if i wrote:
#ask: [[Category:Person]]
[[Hair color::brown]] OR [[Hair color::black]]
[[Eye color::blue]] OR [[Eye color::green]]
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 )
From my initial tests it seems that the latter seems to be the case which seems to make it impossible to create the query i'm after.
Is this feature lacking in smw?
Think i just found the answer: the query should be written as such:
#ask: [[Category:Person]]
[[Hair color::brown||black]]
[[Eye color::blue||green]]
This will give me the correct presecende so logic would get grouped as: ( ( hair = brown or black ) and ( eyes = blue or green ) )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With