query-4175ae13f8d8551ad13adb2826a2c592
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel
WHERE {
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:api "Search";
wikibase:endpoint "www.wikidata.org";
mwapi:srsearch "election".
?title wikibase:apiOutput mwapi:title.
}
BIND(IRI(CONCAT(STR(wd:), ?title)) AS ?item)
FILTER NOT EXISTS { ?item wdt:P31 []. }
FILTER NOT EXISTS { ?item wdt:P279 []. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
# LIMIT 10000
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?item"):::projected
v2("?title")
a2((" "))
a1((" "))
c8(["www.wikidata.org"]):::literal
c10(["election"]):::literal
c4(["bd:serviceParam"]):::iri
c6(["Search"]):::literal
c15(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c12(["mwapi:title"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"wdt:P279"--> e0a1
e0v1("?item"):::projected
e0a1((" ")):::projected
end
f0--EXISTS--> f0e0
f0 --> v3
f0 --> c1
f0 --> a1
v3 --"wdt:P279"--> a1
f1[["not "]]
subgraph f1e1["Exists Clause"]
e1v1 --"wdt:P31"--> e1a1
e1v1("?item"):::projected
e1a1((" ")):::projected
end
f1--EXISTS--> f1e1
f1 --> v3
f1 --> c2
f1 --> a2
v3 --"wdt:P31"--> a2
subgraph s1["http://wikiba.se/ontology#mwapi"]
style s1 stroke-width:4px;
c4 --"mwapi:api"--> c6
c4 --"mwapi:endpoint"--> c8
c4 --"mwapi:srsearch"--> c10
v2 --"mwapi:apiOutput"--> c12
end
bind2[/"concat(str('wd:'),?title)"/]
v2 --o bind2
bind2 --as--o v3
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c4 --"mwapi:language"--> c15
end