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 is a mixed extent?

955


When columns are added to existing tables, what do they initially contain?

978


How to convert numeric expression data types using the cast() function?

1005


What is nonclustered index with included columns ?

908


what are the types of indexes? : Sql server database administration

1062


Tell me what is normalization? Explain different forms of normalization?

983


Can I work with several databases simultaneously? : sql server management studio

945


What are the benefits of normalization?

1045


How can you manage sql azure security?

101


Difference between uniqe index and uniqe constraint?

918


where can you add custom error messages to sql server? : Sql server administration

1048


What is use of attribute hierarchy optimized state? : sql server analysis services, ssas

1010


What is use of except clause? How it differs from not in clause?

974


What are the disadvantages of primary key and foreign key in SQL?

1049


What is “begin trans”, “commit tran”, “rollback tran” and “savetran”?

965