query-4f42cb0e0766176ece4be2d4a5cb95df
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?s ?sLabel
WHERE {
# Generate the desired range of items with a script or for instance with this tool:
# https://textmechanic.com/text-tools/numeration-tools/generate-list-numbers/
VALUES ?s { wd:Q1 wd:Q2 wd:Q3 wd:Q4 wd:Q5 wd:Q6 wd:Q7 wd:Q8 wd:Q9 } # Replace the contents of the curly brackets
MINUS { ?s owl:sameAs []. } # No redirects
FILTER EXISTS { ?s ?p []. } # Must exist or be non-empty
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . }
}
ORDER BY xsd:integer(STRAFTER(STR(?s), "http://www.wikidata.org/entity/Q"))
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?p")
v3("?s"):::projected
a2((" "))
a1((" "))
c4(["bd:serviceParam"]):::iri
c6(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[[" "]]
subgraph f0e0["Exists Clause"]
e0v1 -->e0v2--> e0a1
e0v2("?p"):::projected
e0v1("?s"):::projected
e0a1((" ")):::projected
end
f0--EXISTS--> f0e0
f0 --> v3
f0 --> v2
f0 --> a1
v3 -->v2--> a1
bind1[/VALUES ?s/]
bind1-->v3
bind10(["wd:Q1"])
bind10 --> bind1
bind11(["wd:Q2"])
bind11 --> bind1
bind12(["wd:Q3"])
bind12 --> bind1
bind13(["wd:Q4"])
bind13 --> bind1
bind14(["wd:Q5"])
bind14 --> bind1
bind15(["wd:Q6"])
bind15 --> bind1
bind16(["wd:Q7"])
bind16 --> bind1
bind17(["wd:Q8"])
bind17 --> bind1
bind18(["wd:Q9"])
bind18 --> bind1
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
v3 --"owl:sameAs"--> a2
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end