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

Explain the commands in sql server?

970


Are connections to sql server encrypted?

942


Can an entity have two primary keys?

927


What are different types of replication in sql server?

1036


Tell me what is a linked server?

989


How to retrieve field values using mssql_result()?

1192


What is the difference between having clause and where clause in sql server?

1033


How to perform key word search in tables?

914


How can I tell if sql server is 32 or 64 bit?

904


Explain boyce and codd normal form(bcnf)?

895


Mention the different authentication modes in sql server.

966


What is indexing in sql server with example?

926


Differentiate between a having clause and a where clause.

928


Can you please differentiate between a primary key and a unique key?

955


What is sql azure database?

206