PREFIX schema:
PREFIX property:
PREFIX xsd:
SELECT ?station (avg(?no2) as ?avgno) WHERE {
?obs schema:NO2 ?no2 .
?obs schema:station ?stationObj .
?stationObj property:station ?station .
?stationObj schema:inCity ?cityObj .
?obs schema:year ?year .
?year property:yearNum "2011"^^xsd:integer .
?cityObj property:city ?city .
?obs schema:sensor ?sensor .
?sensor property:statisticShortName "Mean"^^xsd:string .
FILTER(?city = "AALBORG"^^xsd:string || ?city = "COPENHAGEN"^^xsd:string || ?city = "ARHUS"^^xsd:string || ?city = "ODENSE"^^xsd:string)
} GROUP BY ?station HAVING (?avgno > 16.5)