query-3c9e5bc51e161a608753584e640602b5
Participants of expeditionsper Wikidata query:
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
select distinct ?item ?itemLabel ?pm20 ?viewer ?workCount
where {
# all research expeditions
##?expedition wdt:P31 wd:Q366301 .
# alternatively: all expeditions of any type
?expedition p:P31/ps:P31/wdt:P279* wd:Q2401485 .
?item wdt:P1344 ?expedition ;
# with PM20 id
wdt:P4293 ?pm20Id .
# restrict to items with online accessible articles
?item p:P4293/pq:P5592 ?workCount .
filter(?workCount > 0)
# optional image
optional { ?item wdt:P18 ?image . }
# PM20 Link
bind(uri(concat('http://purl.org/pressemappe20/folder/', ?pm20Id)) as ?pm20)
# viewer link
bind(substr(?pm20Id, 4, 4) as ?numStub)
bind(substr(?pm20Id, 4, 6) as ?num)
bind(uri(concat('http://dfg-viewer.de/show/?tx_dlf[id]=http://zbw.eu/beta/pm20mets/', ?numStub, 'xx/', ?num, '.xml')) as ?viewer)
# add labels
service wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en, de, fr, es, nl, pl, ru". }
}
order by desc (?workCount)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?expedition")
v5("?image")
v3("?item"):::projected
v8("?num")
v7("?numStub")
v6("?pm20"):::projected
v4("?pm20Id")
v9("?viewer"):::projected
v1("?workCount"):::projected
a1((" "))
a2((" "))
a3((" "))
c5(["wd:Q2401485"]):::iri
c14(["#91;AUTO_LANGUAGE#93;,en, de, fr, es, nl, pl, ru"]):::literal
c12(["bd:serviceParam"]):::iri
f0[["?workCount > '0^^xsd:integer'"]]
f0 --> v1
v2 --"p:P31"--> a1
a1 --"p:statement/P31"--> a2
a2 --"p:direct/P279"--> c5
v3 --"p:direct/P1344"--> v2
v3 --"p:direct/P4293"--> v4
v3 --"p:P4293"--> a3
a3 --"p:qualifier/P5592"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P18".-> v5
end
bind1[/"concat('http://purl.org/pressemappe20/folder/',?pm20Id)"/]
v4 --o bind1
bind1 --as--o v6
bind2[/"substring(?pm20Id,'4^^xsd:integer','4^^xsd:integer')"/]
v4 --o bind2
bind2 --as--o v7
bind3[/"substring(?pm20Id,'4^^xsd:integer','6^^xsd:integer')"/]
v4 --o bind3
bind3 --as--o v8
bind4[/"concat('http://dfg-viewer.de/show/?tx_dlf#91;id#93;=http://zbw.eu/beta/pm20mets/',?numStub,'xx/',?num,'.xml')"/]
v7 --o bind4
v8 --o bind4
bind4 --as--o v9
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end