query-3fe21616892e83e31968b5c02c70e9e0

rq turtle/ttl

P31/P279 woe 20:44, 1 June 2018 (UTC)) talk (Tagishsimon gets lots of results. I plain don't understand why the wdt:P31/wdt:P279 fails. Can someone enlighten me, please. What manner of stupid am I suffering from today? --?carica wdt:P279 wd:Q3858501. causes zero results; ?carica wdt:P31/wdt:P279 wd:Q3858501.From the above thread ... in the query below,

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT distinct ?item ?itemLabel ?office ?officeLabel ?governoLabel ?inizio ?fine
WHERE 
{
 # ?item wdt:P39/wdt:P279* wd:Q3858501 .
  ?item p:P39 ?statement .
  ?statement ps:P39 ?office . 
  ?office wdt:P279* wd:Q3858501.
#  ?office wdt:P31/wdt:P279* wd:Q3858501.
  OPTIONAL{?statement pq:P5054 ?governo. }
  OPTIONAL{?statement pq:P580 ?inizio .}
  OPTIONAL{?statement pq:P582 ?fine .}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "it". }
}
ORDER BY ?itemLabel ?inizio ?fine

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?fine"):::projected v7("?governo") v2("?inizio"):::projected v4("?item"):::projected v1("?itemLabel"):::projected v6("?office"):::projected v5("?statement") c9(["bd:serviceParam"]):::iri c4(["wd:Q3858501"]):::iri c11(["it"]):::literal v4 --"p:P39"--> v5 v5 --"p:statement/P39"--> v6 v6 --"p:direct/P279"--> c4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:qualifier/P5054".-> v7 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:qualifier/P580".-> v2 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:qualifier/P582".-> v3 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c9 --"wikibase:language"--> c11 end