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 / ravi kumar ravuri

select * from Customer where Customer_ID in (select top 10
from Customer Where City_name in ( select City_Name from
Customer Group by City_Name))

Is This Answer Correct ?    0 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a coalesce function?

1246


what is a deadlock? : Sql server database administration

1147


What is the primary use of the model database?

1128


What are the transaction properties?

1067


What is coalesce and check constraint in sql server?

1173


Does hive support indexing?

999


What are the general features of sql server management studio? : sql server management studio

1132


What are the new features in SQL Server 2005 when compared to SQL Server 2000?

1211


What are the types of containers in ssis?

1231


What are types of subqueries?

1132


What options are there to delete rows on the publisher and not on the subscriber? : sql server replication

1257


What are the differences between char and varchar in ms sql server?

1121


What is the benefit of normalization?

1130


What are functions in the sql server?

1292


How many tables can be joined in SQL Server?

1111