Problem #1
To find people I use
SELECT ?item WHERE {
  ?item (wdt:P31/wdt:P279*) wd:Q5.
}
but to find people still alive I would like to exclude people have not defined one among this property 570, 509, 20. how can I do?
Problem #2
To find tennis tournaments I use
SELECT ?item
WHERE
{
  ?item wdt:P31 wd:Q13219666.
}
Unfortunately, some tournaments are not identified directly and therefore use:
SELECT ?item
WHERE
{
  ?item wdt:P31/wdt:P279 wd:Q13219666.
}
However, I am also returned to the editions of a tournament, such as '2000 wimbledon', '2001 wimbledon', etc while I would like to get only 'wimbledon'. How can I do?
Thank you
As offered in comments...
FILTER NOT EXISTS {?item wdt:P570|wdt:P509|wdt:P20 ?o}
This is a data quality problem. This appears to be a workaround:
SELECT DISTINCT ?item ?itemLabel WHERE { ?item wdt:P31?/wdt:P279? wd:Q13219666 . FILTER NOT EXISTS { ?item wdt:P585 [] } SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . } } # uncomment the following line if desired # VALUES (?item) { (wd:Q41520) }
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