Get top 10 cities per country
450482Aug 27 2007 — edited Aug 28 2007Hi
I am trying to fetch top 10 cities by population for countries listed in the IN clause.
select * from (
Select city_name, population...
from test
where country in ('China','India', 'USA')
order by population
)
where rownum <=10.
What I need as an output is total of 30 rows in this case, 10 for India, 10 for US and 10 for China.
What am I doing wrong here? I get more rows.
Any help appreciated.
Thx!