query-9689e6ca4ffda4fe89cae08b6f301a28

rq turtle/ttl

TODO

Use at

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 ?item ?fileName ?mmm {
  SERVICE wikibase:mwapi {
     bd:serviceParam wikibase:api "Generator" .
     bd:serviceParam wikibase:endpoint "commons.wikimedia.org" .
     bd:serviceParam mwapi:gcmtitle "Category:Graves_without_Wikidata_item" .
     bd:serviceParam mwapi:generator "categorymembers" .
     bd:serviceParam mwapi:gcmtype "page" .
     bd:serviceParam mwapi:gcmlimit "max" .
     bd:serviceParam mwapi:gcmsort "timestamp" .
     bd:serviceParam mwapi:gcmdir "descending" .
     ?file wikibase:apiOutput mwapi:title  .
  }
  BIND(IRI(concat("http://commons.wikimedia.org/wiki/Special:FilePath/",ENCODE_FOR_URI(substr(?file,6)))) as ?fileName) .
  OPTIONAL { 
    ?item wdt:P18 ?fileName .
   }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?file"):::projected v2("?fileName"):::projected v3("?item"):::projected c14(["max"]):::literal c18(["descending"]):::literal c10(["categorymembers"]):::literal c2(["bd:serviceParam"]):::iri c8(["Category:Graves_without_Wikidata_item"]):::literal c12(["page"]):::literal c20(["mwapi:title"]):::iri c6(["commons.wikimedia.org"]):::literal c4(["Generator"]):::literal c16(["timestamp"]):::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 c2 --"mwapi:gcmsort"--> c16 c2 --"mwapi:gcmdir"--> c18 v1 --"mwapi:apiOutput"--> c20 end bind0[/"concat('http://commons.wikimedia.org/wiki/Special:FilePath/',encode-for-uri(substring(?file,'6^^xsd:integer')))"/] v1 --o bind0 bind0 --as--o v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P18".-> v2 end