Created
June 26, 2021 09:24
-
-
Save James-McNeill/e90cf841162358b6e2f600d800baff8f 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
-- Use union to combine the results from two or more select statements (only distinct values) | |
SELECT county, station, max(temp) as max_temp, min(temp) as min_temp | |
FROM hrly_Irish_weather | |
WHERE county = "Cork" | |
GROUP BY county, station | |
UNION | |
SELECT county, station, max(temp) as max_temp, min(temp) as min_temp | |
FROM hrly_Irish_weather | |
WHERE county = "Galway" | |
GROUP BY county, station; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment