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 defaults? : Sql server database administration
How we can compare two database data?
what is isolation level at dead lock?
Can you explain what is sql server english query?
role of sql sever 2005 in database rather than any other database
How do I uninstall sql server 2014?
How do I get to sql server configuration manager?
How to get a list all databases on the sql server?
What stored by the tempdb ? : sql server database administration
what are the steps you will take, if you are tasked with securing an sql server? : Sql server database administration
What are the approximate numeric data types?
What is a result set object returned by odbc_exec()?
Explain rdbms?
John exports information periodically from a microsoft sql server database to an oracle database what is the best way to do this?
What command would you use to add a column to a table in sql server?