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

what authentication modes does sql server support? : Sql server database administration

493


What is side by side migration in sql server?

508


How to check parameter value in stored procedure sql server?

442


Can we hide the definition of a stored procedure from a use?

629


Can you explain how long are locks retained within the repeatable_read and serializable isolation levels, during a read operation with row-level locking?

499






What is extent? Types of extents?

566


What is the default order of an order by clause?

551


what happens on checkpoint? : Sql server database administration

487


Where sql server user names and passwords are stored in sql server? : sql server database administration

552


How to replace given values with null using nullif()?

542


If any stored procedure is encrypted, then can we see its definition in activity monitor?

531


How to enter date and time literals in ms sql server?

483


Explain Normalization and DE normalization

584


Do you know what are the reporting services components?

506


How is sql server used?

525