Click here to Skip to main content
15,879,326 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: (untagged)
For each continent show the continent and number of countries with populations of at least 10 million.

world(name, continent, area, population, gdp)

my answer is :
SQL
select continent, count(name) from world
group by continent
having Min(population)>=10000000

what is the Correct Anwer?!

Edit: moved over to the GimmeCodezz/Homework section. - Marco Bertschi
Posted
Updated 5-May-13 10:26am
v2
Comments
Maciej Los 5-May-13 14:24pm    
Please, be more specific and provide more details (example data). Use "Improve question" widget.

Query look correct!
[no name] 5-May-13 14:28pm    
What is the problem?
ridoy 5-May-13 15:55pm    
I think that is good enough.

1 solution

Your query is just about correct as it stands... just one thing isn't quite right.

The "having" clause is only required when you are wanting to perform some operation over set functions, eg: sum(X), min(Y), count(Z) etc... this is not required in this case. A simple where clause will suffice - try doing that and get back to us if you still can't get it working.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900