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 virtual table in sql?

1000


Does group by sort data?

904


What is scheduled job and how to create it?

1000


Give me a SQL Query to find out the second largest company?

1168


Can you pass expressions to function parameters?

1103


Describe the left outer join & right outer join. : sql server database administration

999


What is statement level trigger?

1008


List out the differences between global and local temp tables in sql server?

1066


Can you name some of the dml commands in sql?

1034


Explain transaction server explicit transaction?

936


What are the tools available in market as an alternative to sql server reporting services?

131


What is the difference between Triggers and Stored Procedure?

1098


How to use copy and concatenate commands in SQL?

1144


What is postgresql server?

1007


what is a default tcp/ip socket assigned for sql server? : Sql server database administration

1076