Click here to Skip to main content
11,709,366 members (40,754 online)
Rate this: bad
good
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 8:06am
mahmii273
Edited 5-May-13 10:26am
v2
Comments
Maciej Los at 5-May-13 14:24pm
   
Please, be more specific and provide more details (example data). Use "Improve question" widget.

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

1 solution

Rate this: bad
good
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.
  Permalink  

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 580
1 OriginalGriff 250
2 Maciej Los 225
3 Peter Leow 219
4 Mika Wendelius 160
0 OriginalGriff 9,428
1 Sergey Alexandrovich Kryukov 9,027
2 CPallini 5,189
3 Maciej Los 4,991
4 Mika Wendelius 3,856


Advertise | Privacy | Mobile
Web01 | 2.8.150819.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