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
What are drillthrough reports?
What is difference between index seek vs. Index scan?
What is ms sql server index?
Disadvantages of the indexes?
What is recompile sql server?
What are the dmvs? : sql server database administration
How do you create a clustered index?
What is parameterized reports in ssrs ?
What is log in sql server?
What is the Control Flow in SSIS
What do you understand by sql server agent?
Explain tables in SQL Azure?
what is sql server? : Sql server database administration
What is tempdb database? : SQL Server Architecture
What happens when converting big values to numeric data types?