query-2bf9b21dc86c24224788acf6a795d2a5

rq turtle/ttl

subclass of subclass ofI have the following tree of instances/subclasses: (Q12720953)protected area of Moldova (Q28861769)wetland of international importance (Q28861760)zoological garden (Q28861757)monument of landscape architecture (Q28861752)dendrological garden (Q28861739)biosphere reserve (Q28861735)windbreak of Moldova (Q28861729)typical plot of meadow vegetation of Moldova (Q28861723)typical plot of steppe vegetation of Moldova (Q28861694)multi-purpose protected area (Q28861659)resource reserve (Q28861616)landscape reserve (Q28861578)mixed nature reserve of Moldova (Q28861520)nature reserve of herbs of Moldova (Q28861464)forest nature reserve of Moldova (Q28861372)nature reserve (Q28861310)secular tree of Moldova (Q28861309)typical plot of forest vegetation of Moldova (Q28861305)botanical natural monument of Moldova (Q28861304)hydrological natural monument of Moldova (Q28861155)geological and paleonthological natural monument of Moldova (Q28861145)nature monument (Q28861137)national park (Q28861097)scientific reserve ...). (Q28861310)secular tree of Moldova , (Q28861304)hydrological natural monument of Moldova , etc.) although I need the level 2 and level 3 types too ((Q28861739)biosphere reserve , (Q28861145)nature monument , (Q28861097)scientific reserve any of these? I tried the following query but it looks like it only displays items with instanceof level 1 types ((P31)instance of How to query all the individual protected areas that have an

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#>
#defaultView:Map
SELECT DISTINCT ?monumentLabel ?monument ?coor ?image WHERE {
  ?monument (wdt:P31/wdt:P279*) wd:Q12720953.
  ?monument ?range wd:Q217.
  OPTIONAL { ?monument wdt:P625 ?coor }
  OPTIONAL { ?monument wdt:P18 ?image }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "ro". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?coor"):::projected v4("?image"):::projected v1("?monument"):::projected v2("?range") a1((" ")) c8(["bd:serviceParam"]):::iri c4(["wd:Q217"]):::iri c10(["ro"]):::literal c3(["wd:Q12720953"]):::iri v1 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c3 v1 -->v2--> c4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P625".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P18".-> v4 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end