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 / sonal parekh
select Top 10 CustomerName, city from customer
| Is This Answer Correct ? | 5 Yes | 31 No |
Post New Answer View All Answers
how would you write a sql query to compute a frequency table of a certain attribute involving two joins? What changes would you need to make if you want to order by or group by some attribute? What would you do to account for nulls?
What is tabulation?
What changes in the front end code is needed if mirroring is implemented for the high availability? : sql server database administration
How to enable/disable indexes?
What is the impact on other user sessions when creating indexes?
What is the contrast amongst drop and truncate?
How do I run a trace in sql server?
Do you know what is normalization of database? What are its benefits?
Tell me what is the stuff and how does it differ from the replace function?
What are scheduled tasks in sql server?
What is the difference between count and distinct count?
What are the basic functions for master, msdb, model, tempdb and resource databases? : SQL Server Architecture
How do I make a resultset scrollable?
What is the syntax for encrypting a column in SQL Server?
What is difference between cte and view?