I have a table called ads and I want to get top 5 countries that ads comes from, and the most popular section in each of those 5 countries counties. for example: India is top 1 and the user from India has chose properties section, Sweden is top 2 and Swedish popular section is Cars,...
In other way I want to get the top 5 countries that ads comes from in my database and I want to get the most section selected by each country, hope that will be more clear :-)
table Name: ads [AdsID] Primary key ,[UID] ,[Section] ,[Category] ,[Country] ,[State] ,[City] ,[AdsTit] ,[AdsDesc] ,[AdsPrice] ,[Img1] ,[Img2] ,[Img3] ,[Img4] ,[Img5] ,[Wtags] ,[AdsDate] ,[Website] ,[premium]
Sql statment for getting top 5
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Abhay ShankerRank #375 · 6.7K reputationPosted Jun 28, 2014, 5:02 PM EDT
It will be also helpful if you can share the details with some sample information
Mike Simo17 reputationPosted Jun 28, 2014, 5:11 PM EDT
for example:
1- Country: India. top 3 section used in India : Cars, properties, Electronics.
1- Country: USA. top 3 section used in USA: Furniture, properties, Animals.
And so on, i hope that is more clear :-)