Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: GimmeCode Homework
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
mahmii273
Edited 5-May-13 11: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 275
1 OriginalGriff 230
2 BillWoodruff 173
3 CPallini 155
4 Kamal Rocks 144
0 OriginalGriff 5,655
1 DamithSL 4,506
2 Maciej Los 3,997
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,180


Advertise | Privacy | Mobile
Web03 | 2.8.141216.1 | Last Updated 6 May 2013
Copyright © CodeProject, 1999-2014
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