PREFIX schema:
PREFIX property:
PREFIX xsd:
PREFIX rdf:
PREFIX qb:
SELECT ?type ?city ?pollutant (avg(?no2) as ?avgno2) WHERE {
?s property:type ?type .
?obs schema:station ?s .
?obs rdf:type qb:Observation .
?obs ?p ?no2 .
?s schema:inCity ?city .
?obs schema:sensor ?sen .
?sen schema:measures ?comp .
?comp property:caption ?pollutant .
FILTER (isLiteral(?no2))
} GROUP BY ?type ?city ?pollutant