forked from zbw/sparql-queries
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpersons.rq
48 lines (47 loc) · 1.39 KB
/
persons.rq
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Persons
#
PREFIX zbwext: <http://zbw.eu/namespaces/zbw-extensions/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
#PREFIX schema: <http://schema.org/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX schema: <http://schema.org/>
PREFIX gndo: <https://d-nb.info/standards/elementset/gnd#>
#
select distinct ?pm20 ?pm20Label ?life
(group_concat(distinct ?nationality; separator='; ') as ?nationalities)
(group_concat(distinct ?activity; separator='; ') as ?activities)
(group_concat(distinct ?location; separator='; ') as ?locations)
?doc (str(?docCount) as ?docLabel)
where {
values ( ?language ) {
( 'de' )
}
{
?pm20 a zbwext:PersonFolder ;
skos:prefLabel ?pm20Label ;
zbwext:freeDocCount ?docCount ;
dcterms:identifier ?pm20Id .
filter(?docCount > 0)
#
}
optional {
?pm20 gndo:dateOfBirthAndDeath ?life .
}
optional {
?pm20 schema:nationality ?nationality .
}
filter (lang(?nationality) = ?language)
optional {
?pm20 zbwext:activity/schema:about ?activity .
}
filter (lang(?activity) = ?language)
optional {
?pm20 zbwext:activity/schema:location ?location .
}
filter (lang(?location) = ?language)
bind(uri(concat('https://pm20.zbw.eu/dfgview/', $pm20Id)) as ?doc)
}
group by ?pm20 ?pm20Label ?life ?doc ?docCount
##order by desc(?docCount)
order by asc(?pm20Label)