From ec25ecb83eec4537dbdf3637a476e19f738464c1 Mon Sep 17 00:00:00 2001 From: Sadat Duraki Date: Tue, 4 Jul 2017 08:15:55 +0300 Subject: [PATCH] Update select-in-select; #5 Add missing single quotes around % and correcting logical mistake with percentage. --- select-in-select.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/select-in-select.sql b/select-in-select.sql index 1d06af6..19043f9 100644 --- a/select-in-select.sql +++ b/select-in-select.sql @@ -48,9 +48,9 @@ Germany (population 80 million) has the largest population of the countries in E Show the name and the population of each country in Europe. Show the population as a percentage of the population of Germany. */ -SELECT name, CONCAT(ROUND(population/(SELECT population FROM world WHERE name = 'Germany'), 0), %) +SELECT name, CONCAT(ROUND(population * 100) /(SELECT population FROM world WHERE name = 'Germany'), 0), '%') FROM world -WHERE continent = 'Europe' +WHERE continent = 'Europe --#6 /*