query-08ea1aaf750d4af16607a59eb621ad83
Sate simple (non-reședințe) din componența comunelor din Moldova SELECT DISTINCT ?item ?itemLabel ?page_title ?raionLabel ?article WHERE {?item wdt:P31 ?tip . ?item wdt:P17 wd:Q217 . ?item wdt:P131 ?raion . OPTIONAL { ?article schema:about ?item.
?item schema:inLanguage "ro".
?article schema:isPartOf <https://ro.wikipedia.org/> ; schema:name ?page_title .
BIND(STR(?article) AS ?wikiLink).
}
FILTER EXISTS { ?item wdt:P31 wd:Q532 } .
MINUS { ?item wdt:P31 wd:Q4413925 } .
MINUS {VALUES ?rank { wikibase:DeprecatedRank } ?item p:P31 [ ps:P31 wd:Q4229812; wikibase:rank ?rank ] . }.
SERVICE wikibase:label { bd:serviceParam wikibase:language "ro". }
}
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Sate simple (non-reședințe) din componența comunelor din Moldova
SELECT DISTINCT ?item ?itemLabel ?page_title ?raionLabel ?article
WHERE {?item wdt:P31 ?tip .
?item wdt:P17 wd:Q217 .
?item wdt:P131 ?raion .
OPTIONAL {
?article schema:about ?item.
# ?item schema:inLanguage "ro".
?article schema:isPartOf <https://ro.wikipedia.org/> ; schema:name ?page_title .
# BIND(STR(?article) AS ?wikiLink).
}
FILTER EXISTS { ?item wdt:P31 wd:Q532 } .
MINUS { ?item wdt:P31 wd:Q4413925 } .
MINUS {VALUES ?rank { wikibase:DeprecatedRank } ?item p:P31 [ ps:P31 wd:Q4229812; wikibase:rank ?rank ] . }.
SERVICE wikibase:label { bd:serviceParam wikibase:language "ro". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?article"):::projected
v1("?item"):::projected
v5("?page_title"):::projected
v3("?raion")
v6("?rank")
v2("?tip")
a1((" "))
c12(["wd:Q4229812"]):::iri
c10(["wd:Q4413925"]):::iri
c2(["wd:Q532"]):::iri
c16(["bd:serviceParam"]):::iri
c4(["wd:Q217"]):::iri
c8([https://ro.wikipedia.org/]):::iri
c18(["ro"]):::literal
f0[[" "]]
subgraph f0e0["Exists Clause"]
e0v1 --"p:direct/P31"--> e0c2
e0v1("?item"):::projected
e0c2(["wd:Q532"]):::iri
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> c2
v1 --"p:direct/P31"--> c2
v1 --"p:direct/P31"--> v2
v1 --"p:direct/P17"--> c4
v1 --"p:direct/P131"--> v3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."schema:about".-> v1
v4 --"schema:isPartOf"--> c8
v4 --"schema:name"--> v5
end
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v1 --"p:direct/P31"--> c10
end
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
bind3[/VALUES ?rank/]
bind3-->v6
bind30(["wikibase:DeprecatedRank"])
bind30 --> bind3
a1 --"p:statement/P31"--> c12
a1 --"wikibase:rank"--> v6
v1 --"p:P31"--> a1
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c16 --"wikibase:language"--> c18
end