Created
March 28, 2024 07:08
-
-
Save lfy79001/8332202c81159ab593f11a606d3e5c04 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
city, AVG(value) as avg_aqi, latitude, longitude | |
FROM | |
`bigquery-public-data.openaq.global_air_quality` | |
WHERE | |
pollutant = 'pm25' | |
AND (city = 'Beijing' OR city = 'Shanghai') | |
AND EXTRACT(YEAR FROM timestamp) BETWEEN 2017 AND 2021 | |
GROUP BY | |
city, latitude, longitude |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment