query-b454b2fd20f5bf5a99861d7cb386119b
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 schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT distinct ?file ?title ?depicts ?label ?wdpa WHERE {
SELECT * WHERE {
{
SELECT * WHERE {
{
SELECT ?file ?title WHERE {
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:api "Generator" .
bd:serviceParam wikibase:endpoint "commons.wikimedia.org" .
bd:serviceParam mwapi:gcmtitle "Category:Images from Wiki Loves Earth 2021 in Australia" .
bd:serviceParam mwapi:generator "categorymembers" .
bd:serviceParam mwapi:gcmtype "file" .
bd:serviceParam mwapi:gcmlimit "max" .
?title wikibase:apiOutput mwapi:title .
?pageid wikibase:apiOutput "@pageid" . }
BIND (URI(CONCAT('https://commons.wikimedia.org/entity/M', ?pageid)) AS ?file)
}
} ?file wdt:P180 ?depicts . } } SERVICE <https://query.wikidata.org/sparql>
{
?depicts wdt:P809 ?wdpa .
?depicts wdt:P17 wd:Q408 .
?depicts rdfs:label ?label filter(lang(?label) = "en" ) .
minus {?sitelink schema:about ?depicts . ?sitelink schema:isPartOf <https://en.wikipedia.org/> .}
}
}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?depicts"):::projected
v3("?file"):::projected
v5("?label"):::projected
v2("?pageid")
v7("?sitelink")
v1("?title"):::projected
v6("?wdpa"):::projected
c23(["wd:Q408"]):::iri
c27([https://en.wikipedia.org/]):::iri
c2(["bd:serviceParam"]):::iri
c12(["file"]):::literal
c6(["commons.wikimedia.org"]):::literal
c17(["@pageid"]):::literal
c14(["max"]):::literal
c8(["Category:Images from Wiki Loves Earth 2021 in Australia"]):::literal
c10(["categorymembers"]):::literal
c16(["mwapi:title"]):::iri
c4(["Generator"]):::literal
subgraph s1["http://wikiba.se/ontology#mwapi"]
style s1 stroke-width:4px;
c2 --"mwapi:api"--> c4
c2 --"mwapi:endpoint"--> c6
c2 --"mwapi:gcmtitle"--> c8
c2 --"mwapi:generator"--> c10
c2 --"mwapi:gcmtype"--> c12
c2 --"mwapi:gcmlimit"--> c14
v1 --"mwapi:apiOutput"--> c16
v2 --"mwapi:apiOutput"--> c17
end
bind0[/"concat('https://commons.wikimedia.org/entity/M',?pageid)"/]
v2 --o bind0
bind0 --as--o v3
v3 --"wdt:P180"--> v4
subgraph s2["https://query.wikidata.org/sparql"]
style s2 stroke-width:4px;
f1[["?label = 'en'"]]
f1 --> v5
v4 --"wdt:P809"--> v6
v4 --"wdt:P17"--> c23
v4 --"rdfs:label"--> v5
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
v7 --"schema:about"--> v4
v7 --"schema:isPartOf"--> c27
end
end