query-ac6dc96b7a2bcd0b1d8eccccaf022474

rq turtle/ttl

العواصم السابقة(P576)dissolved, abolished or demolished date (P582)end time (P625)coordinate location (P36)capital الخصائص المستخدمة: Former capitals Former capitals(P576)dissolved, abolished or demolished date (P582)end time (P625)coordinate location (P36)capital Propietats usades: Bývalá hlavní města(P576)dissolved, abolished or demolished date (P582)end time (P625)coordinate location (P36)capital Použité vlastnosti: Former capitals(P576)dissolved, abolished or demolished date (P582)end time (P625)coordinate location (P36)capital Brugte egenskaber: Frühere Hauptstädte(P576)dissolved, abolished or demolished date (P582)end time (P625)coordinate location (P36)capital Verwendete Eigenschaften: Former capitals Former capitals Eksĉefurboj Former capitals(P576)dissolved, abolished or demolished date (P582)end time (P625)coordinate location (P36)capital Propiedades utilizadas: Former capitals Anciennes capitales(P576)dissolved, abolished or demolished date (P582)end time (P625)coordinate location (P36)capital Propriétés les plus utilisées : בירות לשעבר(P576)dissolved, abolished or demolished date (P582)end time (P625)coordinate location (P36)capital מאפיינים משמשים: Նախկին մայրաքաղաքներ Former capitals Ex capitali(P576)dissolved, abolished or demolished date (P582)end time (P625)coordinate location (P36)capital Proprietà utilizzate: 以前の首都(P576)dissolved, abolished or demolished date (P582)end time (P625)coordinate location (P36)capital 使用プロパティ: Former capitals Fréier Haaptstied Former capitals Former capitals Voormalige hoofdsteden(P576)dissolved, abolished or demolished date (P582)end time (P625)coordinate location (P36)capital Gebruikte eigenschappen: Former capitals(P576)dissolved, abolished or demolished date (P582)end time (P625)coordinate location (P36)capital Wykorzystujące właściwości: Former capitals Former capitals Бывшие столицы Former capitals Tidigare huvudstäder(P576)dissolved, abolished or demolished date (P582)end time (P625)coordinate location (P36)capital Egenskaper som används: Former capitals Eski başkentler Колишні столиці(P576)dissolved, abolished or demolished date (P582)end time (P625)coordinate location (P36)capital Використані властивості: Former capitals 前首都(P576)dissolved, abolished or demolished date (P582)end time (P625)coordinate location (P36)capital 使用属性:

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
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#>
#defaultView:Map
SELECT DISTINCT ?country ?countryLabel ?capital ?capitalLabel ?coordinates ?ended
WHERE
{
  ?country p:P36 ?stat.
  ?stat ps:P36 ?capital.
  ?capital wdt:P625 ?coordinates.
  OPTIONAL {
    ?country wdt:P582|wdt:P576 ?ended.
  }
  OPTIONAL {
    ?capital wdt:P582|wdt:P576 ?ended.
  }
  OPTIONAL {
    ?stat pq:P582 ?ended.
  }
  FILTER(BOUND(?ended)).
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?capital"):::projected v5("?coordinates"):::projected v2("?country"):::projected v1("?ended"):::projected v3("?stat") c8(["bd:serviceParam"]):::iri c10(["#91;AUTO_LANGUAGE#93;,mul,en"]):::literal f0[["bound(?ended)"]] f0 --> v1 v2 --"p:P36"--> v3 v3 --"p:statement/P36"--> v4 v4 --"p:direct/P625"--> v5 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v2 -."p:direct/P576".-> v1 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"p:direct/P582"--> v1 end union0r <== or ==> union0l end end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; v4 -."p:direct/P576".-> v1 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v4 --"p:direct/P582"--> v1 end union1r <== or ==> union1l end end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:qualifier/P582".-> v1 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end