query-8eb0a60d59fb9492eeab32e06d727057

rq turtle/ttl

List of countries + nature + time

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
select distinct ?country (group_concat(?NatureLabelFr;separator=", ") as ?NatureLabelFr) ?countryLabel  ?creationDate ?dissolutionDate
where {
 {
select ?country (coalesce(?countryLabelFr, ?countryLabelEn,  ?country) as ?countryLabel) ?creationDate ?dissolutionDate{
VALUES ?what { 
               wd:Q3624078 # sovereign states, I don’t know if it’s the right item
               wd:Q3024240 # états historiques
             }
?country wdt:P31/wdt:P279* ?what . 
MINUS { ?country (wdt:P31/wdt:P279*) wd:Q1790360. } #empires coloniaux
MINUS { ?country (wdt:P31/wdt:P279*) wd:Q1371288. } #états vassals
MINUS { ?country (wdt:P31/wdt:P279*) wd:Q21512251. } #états autoproclamés
MINUS { ?country (wdt:P31/wdt:P279*) wd:Q1642488. } #chefferies
optional { ?country rdfs:label ?countryLabelFr filter(lang(?countryLabelFr)= "fr")} .
optional { ?country rdfs:label ?countryLabelEn filter(lang(?countryLabelEn)= "en")}
optional { ?country wdt:P571 ?creationDate }
optional { ?country wdt:P576 ?dissolutionDate }
} order by ?countryLabel
}.
optional{
?country wdt:P31/rdfs:label ?NatureLabelFr filter(lang(?NatureLabelFr)= "fr") .
}
} group by ?country ?countryLabel  ?creationDate ?dissolutionDate

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v9("?NatureLabelFr"):::projected v6("?country"):::projected v9("?countryLabel"):::projected v3("?countryLabelEn") v4("?countryLabelFr") v7("?creationDate"):::projected v8("?dissolutionDate"):::projected v5("?what") a1((" ")) a2((" ")) a3((" ")) a4((" ")) a5((" ")) a6((" ")) c7(["wd:Q21512251"]):::iri c8(["wd:Q1642488"]):::iri c6(["wd:Q1371288"]):::iri c5(["wd:Q1790360"]):::iri bind0[/VALUES ?what/] bind0-->v5 bind00(["wd:Q3624078"]) bind00 --> bind0 bind01(["wd:Q3024240"]) bind01 --> bind0 v6 --"wdt:P31"--> a1 a1 --"wdt:P279"--> v5 subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v6 --"wdt:P31"--> a2 a2 --"wdt:P279"--> c5 end subgraph minus2["MINUS"] style minus2 stroke-width:6px,fill:pink,stroke:red; v6 --"wdt:P31"--> a3 a3 --"wdt:P279"--> c6 end subgraph minus3["MINUS"] style minus3 stroke-width:6px,fill:pink,stroke:red; v6 --"wdt:P31"--> a4 a4 --"wdt:P279"--> c7 end subgraph minus4["MINUS"] style minus4 stroke-width:6px,fill:pink,stroke:red; v6 --"wdt:P31"--> a5 a5 --"wdt:P279"--> c8 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v6 -."rdfs:label".-> v4 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v6 -."rdfs:label".-> v3 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v6 -."wdt:P571".-> v7 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v6 -."wdt:P576".-> v8 end bind5[/"?countryLabelFr?countryLabelEn?country"/] v4 --o bind5 v3 --o bind5 v6 --o bind5 bind5 --as--o v9 subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v6 -."wdt:P31".-> a6 a6 --"rdfs:label"--> v9 end bind7[/"?NatureLabelFr"/] v9 --o bind7 bind7 --as--o v9