query-182a895438feecf5471dc3065718517f

rq turtle/ttl

TODO

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT (COUNT(DISTINCT ?protected_area ) AS ?count)
WHERE
{  
  {
    ?prop wdt:P31 wd:Q55978235.
    ?prop wikibase:directClaim ?claim.
    ?protected_area ?claim [].
  }
  UNION 
  {
    ?protected_area wdt:P31/wdt:P279* wd:Q473972.
  }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?claim") v4("?count") v1("?prop") v3("?protected_area"):::projected a1((" ")) a2((" ")) c5(["wd:Q473972"]):::iri c2(["wd:Q55978235"]):::iri subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P31"--> a2 a2 --"wdt:P279"--> c5 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> c2 v1 --"wikibase:directClaim"--> v2 v3 -->v2--> a1 end union0r <== or ==> union0l end bind1[/"count(?protected_area)"/] v3 --o bind1 bind1 --as--o v4