query-838ba311ee7acf08575fe8d0d435b35c
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 ?ordinal ?item ?itemLabel ?itemDescription ?image WHERE {
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:api "EntitySearch";
wikibase:endpoint "www.wikidata.org";
mwapi:search "Patriots";
mwapi:limit 1000;
mwapi:language "en" .
?item wikibase:apiOutputItem mwapi:item .
?ordinal wikibase:apiOrdinal true .
}
?item wdt:P31/wdt:P279* ?type.
OPTIONAL{?item wdt:P18 ?image .}
FILTER( ?type in (wd:Q5, wd:Q17537576, wd:Q12973014))
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ASC (?ordinal) LIMIT 100
Query found at
- https://www.wikidata.org/wiki/Wikidata:Contact_the_development_team/Archive/2019/07
- https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2020/01
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?image"):::projected
v3("?item"):::projected
v1("?ordinal"):::projected
v2("?type")
a1((" "))
c9(["www.wikidata.org"]):::literal
c17(["mwapi:item"]):::iri
c13(["1000^^xsd:integer"]):::literal
c15(["en"]):::literal
c11(["Patriots"]):::literal
c5(["bd:serviceParam"]):::iri
c7(["EntitySearch"]):::literal
c19(["true^^xsd:boolean"]):::literal
c24(["#91;AUTO_LANGUAGE#93;,en"]):::literal
list0c1(["wd:Q5"]):::iri
list0c3(["wd:Q12973014"]):::iri
list0c2(["wd:Q17537576"]):::iri
list0c1 --o f0
list0c2 --o f0
list0c3 --o f0
f0[[" in "]]
f0 --> v2
subgraph s1["http://wikiba.se/ontology#mwapi"]
style s1 stroke-width:4px;
c5 --"mwapi:api"--> c7
c5 --"mwapi:endpoint"--> c9
c5 --"mwapi:search"--> c11
c5 --"mwapi:limit"--> c13
c5 --"mwapi:language"--> c15
v3 --"mwapi:apiOutputItem"--> c17
v1 --"mwapi:apiOrdinal"--> c19
end
v3 --"wdt:P31"--> a1
a1 --"wdt:P279"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P18".-> v4
end
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c5 --"mwapi:language"--> c24
end