query-bc726c21e2e4070c37c140e5d9590309

rq turtle/ttl

Subclass issueThe U.S. Open is an open golf tournament which is a subclass of golf tournament. It makes sense to be both a major and an open golf tournament: major does not → open golf tournament. It does not make sense for a major and a golf tournament: major → golf tournament.

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT  ?tournament ?tournamentLabel WHERE {
  # tournament is a men's major
  # e.g., 2019 Masters Tournament Q55316366 is P31 of Masters Tournament Q280275
  #    P279 of golf tournament Q15061650 (argh! inappropriate subclass)
  #    P279 of men's major golf championships Q268554
  #      P279 of golf tournament Q15061650

  ?tournament wdt:P279 wd:Q268554 .

  # just a golf tournament
  ?tournament wdt:P279+ wd:Q15061650 .

  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
  }
} ORDER BY ?tournamentLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?tournament"):::projected v1("?tournamentLabel"):::projected c5(["bd:serviceParam"]):::iri c7(["en"]):::literal c2(["wd:Q268554"]):::iri c3(["wd:Q15061650"]):::iri v2 --"wdt:P279"--> c2 v2 --"wdt:P279"--> c3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end