query-7a828353874014d5b09885fcf6dd0300

rq turtle/ttl

How to instruct SPARQL to do subqueries first then outer instructions?I executed the following query and It returned 5 results in 137ms.

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?a
{
   {
  SELECT ?a {
    VALUES ?a {wd:Q1 wd:Q5 wd:Q8}.
  }
}
  ?a wdt:P31 [].
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?a"):::projected a1((" ")) bind0[/VALUES ?a/] bind0-->v1 bind00(["wd:Q1"]) bind00 --> bind0 bind01(["wd:Q5"]) bind01 --> bind0 bind02(["wd:Q8"]) bind02 --> bind0 v1 --"wdt:P31"--> a1