diff --git a/select-from-nobel.sql b/select-from-nobel.sql index 9e15cba..9bacc1c 100644 --- a/select-from-nobel.sql +++ b/select-from-nobel.sql @@ -119,7 +119,7 @@ The expression subject IN ('Chemistry','Physics') can be used as a value - it wi Show the 1984 winners ordered by subject and winner name; but list Chemistry and Physics last. */ -SELECT winner, subject, subject IN ('Physics','Chemistry') +SELECT winner, subject FROM nobel WHERE yr=1984 ORDER BY subject IN ('Physics','Chemistry'),subject,winner diff --git a/select-in-select.sql b/select-in-select.sql index 1d06af6..7b29d9b 100644 --- a/select-in-select.sql +++ b/select-in-select.sql @@ -48,7 +48,7 @@ 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'