Mike Simo

Mike Simo

  • NA
  • 17
  • 12.5k

sql statment for getting top 5

Jun 28 2014 8:27 PM
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] 


Answers (2)