query-745a095eea99b4d4363f687adfd60818

rq turtle/ttl

Abfragen von Property Qualifier (Start- und Endzeit) SELECT ?item ?itemLabel

?itemDescription

?hasc ?nuts ?startime ?endtime

?capital

WHERE { ?item wdt:P17 wd:Q183. ?item wdt:P131 wd:Q1202. OPTIONAL{?item wdt:P8119 ?hasc. } ?item wdt:P605 ?nuts. OPTIONAL{?item p:P605 [ pq:P580 ?starttime ] . } # pq Property Qualifier OPTIONAL{?item p:P605 [ pq:P582 ?endtime ] . } #?item wdt:P36 ?capital.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } order by ?endtime ?itemLabel

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Abfragen von Property Qualifier (Start- und Endzeit)
SELECT ?item ?itemLabel 
#?itemDescription 
?hasc ?nuts ?startime ?endtime 
#?capital 
WHERE 
{
  ?item wdt:P17 wd:Q183.
  ?item wdt:P131 wd:Q1202.
  OPTIONAL{?item wdt:P8119 ?hasc. }
  ?item wdt:P605  ?nuts.
  OPTIONAL{?item p:P605 [  pq:P580 ?starttime ]  . }    # pq Property Qualifier
  OPTIONAL{?item p:P605 [  pq:P582 ?endtime ]  . }
  #?item wdt:P36 ?capital.  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
order by ?endtime ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?endtime"):::projected v4("?hasc"):::projected v3("?item"):::projected v2("?itemLabel"):::projected v5("?nuts"):::projected v6("?starttime") a1((" ")) a2((" ")) c11(["bd:serviceParam"]):::iri c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal c2(["wd:Q183"]):::iri c4(["wd:Q1202"]):::iri v3 --"p:direct/P17"--> c2 v3 --"p:direct/P131"--> c4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:direct/P8119".-> v4 end v3 --"p:direct/P605"--> v5 subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; a1 -."p:qualifier/P580".-> v6 v3 --"p:P605"--> a1 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; a2 -."p:qualifier/P582".-> v1 v3 --"p:P605"--> a2 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end