Click here to Skip to main content
11,928,919 members (48,216 online)
Rate this:
Please Sign up or sign in to 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 :
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 5-May-13 9:06am
Edited 5-May-13 11:26am
Maciej Los 5-May-13 14:24pm
Please, be more specific and provide more details (example data). Use "Improve question" widget.

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

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.151126.1 | Last Updated 6 May 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100