query-20d76be07a14dfb517cdd0e6eaf545cb
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 bd: <http://www.bigdata.com/rdf#>
SELECT ?file ?title ?P180
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:Heitor Villa-Lobos" .
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)
}
} filter not exists {?file wdt:P180 ?P180 .}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?P180"):::projected
v5("?file"):::projected
v4("?pageid")
v3("?title"):::projected
c15(["max"]):::literal
c11(["categorymembers"]):::literal
c3(["bd:serviceParam"]):::iri
c13(["file"]):::literal
c17(["mwapi:title"]):::iri
c7(["commons.wikimedia.org"]):::literal
c9(["Category:Heitor Villa-Lobos"]):::literal
c18(["@pageid"]):::literal
c5(["Generator"]):::literal
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"wdt:P180"--> e0v2
e0v2("?P180"):::projected
e0v1("?file"):::projected
end
f0--EXISTS--> f0e0
f0 --> v5
f0 --> c1
f0 --> v2
v5 --"wdt:P180"--> v2
subgraph s1["http://wikiba.se/ontology#mwapi"]
style s1 stroke-width:4px;
c3 --"mwapi:api"--> c5
c3 --"mwapi:endpoint"--> c7
c3 --"mwapi:gcmtitle"--> c9
c3 --"mwapi:generator"--> c11
c3 --"mwapi:gcmtype"--> c13
c3 --"mwapi:gcmlimit"--> c15
v3 --"mwapi:apiOutput"--> c17
v4 --"mwapi:apiOutput"--> c18
end
bind1[/"concat('https://commons.wikimedia.org/entity/M',?pageid)"/]
v4 --o bind1
bind1 --as--o v5