-
Notifications
You must be signed in to change notification settings - Fork 3
/
cross-year-totals.dep
24 lines (20 loc) · 1.06 KB
/
cross-year-totals.dep
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Totals per municipality, cross years, ordered by municipality
PREFIX qb: <http://purl.org/linked-data/cube#>
PREFIX cedar: <http://lod.cedar-project.nl/vocab/cedar#>
PREFIX sdmx-dimension: <http://purl.org/linked-data/sdmx/2009/dimension#>
PREFIX sdmx-code: <http://purl.org/linked-data/sdmx/2009/code#>
SELECT ?municipality ?year (SUM(?pop) AS ?tot)
FROM <urn:graph:cedar-mini:release>
WHERE { ?obs a qb:Observation .
?obs cedar:population ?pop .
?obs sdmx-dimension:sex sdmx-code:sex-M .
?obs sdmx-dimension:refArea ?municipality .
?obs cedar:residenceStatus <http://lod.cedar-project.nl/vocab/cedar-residenceStatus#TijdelijkAanwezig> .
?slice a qb:Slice.
?slice qb:observation ?obs.
?slice sdmx-dimension:refPeriod ?year .
FILTER (NOT EXISTS {?obs cedar:houseType ?house }) .
FILTER (NOT EXISTS {?obs cedar:isTotal ?total }) .
FILTER (?year IN (1879, 1899)) .
FILTER (regex(?obs, "VT_1879_01_H1-S0|VT_1899_07_H1-S0", "i")) .
} GROUP BY ?municipality ?year ORDER BY ?municipality