query-2680160fb578506215f4f22d9596861a

rq turtle/ttl

Find AFD ids having a plant as a parent
SELECT ?item ?itemLabel WITH { SELECT ?item WHERE { SERVICE bd:slice { ?item wdt:P6039 _:afd_id . bd:serviceParam bd:slice.offset 0 . bd:serviceParam bd:slice.limit 25000 . } ?item wdt:P171* wd:Q756 . hint:Prior hint:gearing "forward" . } } AS %sub WHERE { INCLUDE %sub SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } }

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#>
# Find AFD ids having a plant as a parent  
SELECT ?item ?itemLabel
WHERE
{

{
  SELECT ?item
  WHERE
  {
    SERVICE bd:slice
    {
      ?item wdt:P6039 _:afd_id .
      bd:serviceParam bd:slice.offset 0 .
      bd:serviceParam bd:slice.limit 25000 .
    }
    ?item wdt:P171* wd:Q756 .

  }
}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } 
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?item"):::projected a1((" ")) c5(["0^^xsd:integer"]):::literal c3(["bd:serviceParam"]):::iri c7(["25000^^xsd:integer"]):::literal c9(["wd:Q756"]):::iri c12(["en"]):::literal subgraph s1["http://www.bigdata.com/rdf#slice"] style s1 stroke-width:4px; v1 --"wdt:P6039"--> a1 c3 --"bd:slice.offset"--> c5 c3 --"bd:slice.limit"--> c7 end v1 --"wdt:P171"--> c9 subgraph s2["http://wikiba.se/ontology#label"] style s2 stroke-width:4px; c3 --"wikibase:language"--> c12 end