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


Please Help Members By Posting Answers For Below Questions

Which are ddl commands?

708


How to backup SQL Server Reporting Services ?

122


Can we delete data from a view?

708


How can we get count of the number of records in a table?

697


Why is the need for data conversion transformations?

696






What are recommended options to be used while using db mirroring? : sql server database administration

763


How to fine-tune reports?

211


Where can you add custom error messages to sql server?

776


How display code or Text of Stored Procedure using Sql query in Sql Server ?

816


While you are inserting values into a table with the insert into .. Values option, does the order of the columns in the insert statement have to be the same as the order of the columns in the table?

783


How to stop a loop early with break statements in ms sql server?

761


What is a database in ms sql server?

735


How do I start and stop sql server?

703


Explain the dbcc pintable command when would you use it?

685


Explain Capacity planning to create a database? and how to monitor it?

3950