query-dd58cb7abfb54eda819fd9f26857c7b1

rq turtle/ttl

TODO

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 vassals
             }
?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
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((" ")) 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 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 bind3[/"?countryLabelFr?countryLabelEn?country"/] v4 --o bind3 v3 --o bind3 v6 --o bind3 bind3 --as--o v9 subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v6 -."wdt:P31".-> a4 a4 --"rdfs:label"--> v9 end bind5[/"?NatureLabelFr"/] v9 --o bind5 bind5 --as--o v9