query-045da210e931e93d698c1fe6677faa96
https://wcqs-beta.wmflabs.org/QUery to be used on
Use at
- https://query.wikidata.org/sparql
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#>
select DISTINCT ?item ?collectie (sample (?filename) as ?urlsample) where {
{
select * {
service <https://query.wikidata.org/sparql> {
?item wdt:P31 wd:Q5 .
{?item wdt:P106/wdt:P279* wd:Q33231} #fotograaf
#{?item wdt:P106/wdt:P279* wd:Q3391743} #beeldend kunstenaar
# FILTER NOT EXISTS { ?item wdt:P7763 [].}
}
}
}
?image wdt:P170 ?item.
?image wdt:P195 ?collectie.
?image schema:contentUrl ?url .
# ?image rdfs:label ?filename .
bind(replace(wikibase:decodeUri(substr(str(?url),53)), "_", " ") AS ?filename)
FILTER NOT EXISTS { ?item wdt:P6379 ?collectie.}
}
group by ?item ?collectie
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?collectie"):::projected
v5("?filename"):::projected
v3("?image")
v1("?item"):::projected
v4("?url")
v6("?urlsample")
a1((" "))
c7(["wd:Q33231"]):::iri
c4(["wd:Q5"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"wdt:P6379"--> e0v2
e0v2("?collectie"):::projected
e0v1("?item"):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> v2
v1 --"wdt:P6379"--> v2
subgraph s1["https://query.wikidata.org/sparql"]
style s1 stroke-width:4px;
v1 --"wdt:P31"--> c4
v1 --"wdt:P106"--> a1
a1 --"wdt:P279"--> c7
end
v3 --"wdt:P170"--> v1
v3 --"wdt:P195"--> v2
v3 --"schema:contentUrl"--> v4
bind1[/"replace(http://wikiba.se/ontology#decodeUri(substring(str(?url),'53^^xsd:integer')),'_',' ')"/]
v4 --o bind1
bind1 --as--o v5
bind3[/"sample(?filename)"/]
v5 --o bind3
bind3 --as--o v6