Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

A table contains list of customers and his city with other
details. Each customer has a unique number and the table
consists millions of data. Query is: I want to retrieve 10
customers from each city, no script, only from single query?

Answer Posted / abhijith

select top 10
from tablename
where city IN
(select distinct(city) from tablename)

Is This Answer Correct ?    2 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are defaults? : Sql server database administration

1099


How we can compare two database data?

956


what is isolation level at dead lock?

2162


Can you explain what is sql server english query?

1004


role of sql sever 2005 in database rather than any other database

1951


How do I uninstall sql server 2014?

946


How do I get to sql server configuration manager?

1017


How to get a list all databases on the sql server?

1109


What stored by the tempdb ? : sql server database administration

1059


what are the steps you will take, if you are tasked with securing an sql server? : Sql server database administration

1049


What are the approximate numeric data types?

947


What is a result set object returned by odbc_exec()?

1036


Explain rdbms?

1046


John exports information periodically from a microsoft sql server database to an oracle database what is the best way to do this?

949


What command would you use to add a column to a table in sql server?

1317