query-2b8a2b98f6583bf7296a2b47a7b75714
nouvelle liste des 2800 à nettoyer
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT distinct ?item ?itemLabel ?itemdesc_fr ?itemdesc_en ?creat ?dissolution WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,fr". }
# values ?item {wd:Q101104073}
?item wdt:P31/wdt:P279* wd:Q3024240.
MINUS { ?item (wdt:P31/wdt:P279*) wd:Q1790360. } #empires coloniaux
MINUS { ?item (wdt:P31/wdt:P279*) wd:Q1371288. } #états vassals
MINUS { ?item (wdt:P31/wdt:P279*) wd:Q21512251. } #états autoproclamés
MINUS { ?item (wdt:P31/wdt:P279*) wd:Q1642488. } #chefferies
OPTIONAL { ?item wdt:P571 ?creat. }
OPTIONAL { ?item wdt:P576 ?dissolution. }
FILTER (!bound(?dissolution))
OPTIONAL {?item schema:description ?itemdesc_fr . FILTER((LANG(?itemdesc_fr)) = "fr") BIND (TRUE as ?true) }
OPTIONAL {?item schema:description ?itemdesc_en . FILTER((LANG(?itemdesc_en)) = "en") BIND (TRUE as ?true) }
OPTIONAL { FILTER NOT EXISTS {?item schema:description ?itemdesc .} BIND (TRUE as ?true)}
filter(BOUND(?true))
} order by ?creat
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?creat"):::projected
v6("?dissolution"):::projected
v3("?item"):::projected
v4("?itemdesc")
v5("?itemdesc_en"):::projected
v7("?itemdesc_fr"):::projected
v8("?true")
a1((" "))
a2((" "))
a3((" "))
a4((" "))
a5((" "))
c13(["wd:Q21512251"]):::iri
c14(["wd:Q1642488"]):::iri
c12(["wd:Q1371288"]):::iri
c7(["en,fr"]):::literal
c10(["wd:Q3024240"]):::iri
c5(["bd:serviceParam"]):::iri
c11(["wd:Q1790360"]):::iri
f0[["bound(?true)"]]
f0 --> v8
f1[["not bound(?dissolution)"]]
f1 --> v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c5 --"wikibase:language"--> c7
end
v3 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c10
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
v3 --"wdt:P31"--> a2
a2 --"wdt:P279"--> c11
end
subgraph minus3["MINUS"]
style minus3 stroke-width:6px,fill:pink,stroke:red;
v3 --"wdt:P31"--> a3
a3 --"wdt:P279"--> c12
end
subgraph minus4["MINUS"]
style minus4 stroke-width:6px,fill:pink,stroke:red;
v3 --"wdt:P31"--> a4
a4 --"wdt:P279"--> c13
end
subgraph minus5["MINUS"]
style minus5 stroke-width:6px,fill:pink,stroke:red;
v3 --"wdt:P31"--> a5
a5 --"wdt:P279"--> c14
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P571".-> v1
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P576".-> v6
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v3 -."schema:description".-> v7
bind6[/"'true^^xsd:boolean'"/]
bind6 --as--o v8
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v3 -."schema:description".-> v5
bind7[/"'true^^xsd:boolean'"/]
bind7 --as--o v8
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
bind8[/"'true^^xsd:boolean'"/]
bind8 --as--o v8
end