From c2ce85ad4c7506d9601c91cf0dce39dd09ab81ce Mon Sep 17 00:00:00 2001 From: lub Date: Sat, 18 May 2019 13:41:14 +0200 Subject: [PATCH] mysql: add average-population-of-each-continent --- mysql/average-population-of-each-continent/solution.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 mysql/average-population-of-each-continent/solution.sql diff --git a/mysql/average-population-of-each-continent/solution.sql b/mysql/average-population-of-each-continent/solution.sql new file mode 100644 index 0000000..da84a86 --- /dev/null +++ b/mysql/average-population-of-each-continent/solution.sql @@ -0,0 +1,4 @@ +SELECT COUNTRY.CONTINENT, FLOOR(AVG(CITY.POPULATION)) +FROM CITY +INNER JOIN COUNTRY ON COUNTRY.CODE = CITY.COUNTRYCODE +GROUP BY COUNTRY.CONTINENT \ No newline at end of file