-
Notifications
You must be signed in to change notification settings - Fork 3
/
houseType_params.rq
30 lines (28 loc) · 1.09 KB
/
houseType_params.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
#+ summary: Number of housing types according to residence status, location and year
#+ tags:
#+ - houseType
#+ enumerate:
#+ - residenceStatus
#+ - Kom
#+ - year
#+ - houseType
#+ - location
PREFIX cedar: <http://lod.cedar-project.nl:8888/cedar/resource/>
PREFIX maritalstatus: <http://lod.cedar-project.nl/vocab/cedar-maritalstatus#>
PREFIX sdmx-dimension: <http://purl.org/linked-data/sdmx/2009/dimension#>
PREFIX sdmx-code: <http://purl.org/linked-data/sdmx/2009/code#>
PREFIX cedarterms: <http://lod.cedar-project.nl/vocab/cedar#>
PREFIX qb: <http://purl.org/linked-data/cube#>
PREFIX gg: <http://www.gemeentegeschiedenis.nl/amco/>
SELECT (SUM(?pop) AS ?tot) FROM <urn:graph:cedar-mini:release> WHERE {
?obs a qb:Observation.
?obs sdmx-dimension:refArea ?_location_iri.
?obs cedarterms:Kom ?_Kom_iri.
?obs cedarterms:population ?pop.
?slice a qb:Slice.
?slice qb:observation ?obs.
?slice sdmx-dimension:refPeriod ?_year_integer.
?obs cedarterms:houseType ?_houseType_iri.
?obs cedarterms:residenceStatus ?_residenceStatus_iri .
FILTER (NOT EXISTS {?obs cedarterms:isTotal ?total })
}