query-9de2ce60a914e85fad3a0cc2e71ecc41

rq turtle/ttl

TODO

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX osmm: <https://www.openstreetmap.org/meta/>
PREFIX osmt: <https://wiki.openstreetmap.org/wiki/Key:>

select ?wd ?s ?commons
where {
  SERVICE <https://sophox.org/sparql> {
    select ?s ?wd ?commons
    where {
      ?s osmt:wikimedia_commons ?commons_ ;
         osmt:wikidata ?wd .
      BIND(URI(CONCAT("https://commons.wikimedia.org/wiki/", ?commons_)) AS ?commons)
    }
  }
  FILTER NOT EXISTS { ?wd wdt:P18 [] . }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?commons"):::projected v3("?commons_") v2("?s"):::projected v1("?wd"):::projected a1((" ")) f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"wdt:P18"--> e0a1 e0v1("?wd"):::projected e0a1((" ")):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> a1 v1 --"wdt:P18"--> a1 subgraph s1["https://sophox.org/sparql"] style s1 stroke-width:4px; v2 --https://wiki.openstreetmap.org/wiki/Key:wikimedia_commons--> v3 v2 --https://wiki.openstreetmap.org/wiki/Key:wikidata--> v1 bind1[/"concat('https://commons.wikimedia.org/wiki/',?commons_)"/] v3 --o bind1 bind1 --as--o v4 end