We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
We only need 2 columns in the result set,i.e., continent and average population. Remove city.name from your query.
You have used round which is correct, but this problem demands us to round the value down to the nearest integer. So, you will have to use either floor() or subtract 0.5 from the avg value and apply round on it(this would go the base integer instead of moving to next one if the decimal part of avg happend to be >=0.5). I used below queries-
Average Population of Each Continent
You are viewing a single comment's thread. Return to all comments →
We only need 2 columns in the result set,i.e.,
continent
andaverage population
. Remove city.name from your query.You have used round which is correct, but this problem demands us to round the value down to the nearest integer. So, you will have to use either
floor()
or subtract 0.5 from the avg value and apply round on it(this would go the base integer instead of moving to next one if the decimal part of avg happend to be >=0.5). I used below queries-OR