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 / ravi kumar ravuri
select * from Customer where Customer_ID in (select top 10
from Customer Where City_name in ( select City_Name from
Customer Group by City_Name))
Is This Answer Correct ? | 0 Yes | 4 No |
Post New Answer View All Answers
How efficient you are in oracle and SQL server?
What are the parts of a function?
What does <> symbol mean?
you have developed an application which uses many stored procedures and triggers to update various tables users ocassionally get locking problems which tool is best suited to help you diagnose the problem? : Sql server administration
Can you explain what are various ways to enhance the ssrs report?
Explain how you can deploy an SSRS report?
Explain the difference between clustered and non-clustered index?
What is federation member?
What is the function of inner join?
How to scale out a federation by Sql statement?
What is merge join?
Is it safe to delete log files?
Which data type columns are the best candidates for full-text indexing?
what are the different ways of moving data/databases between servers and databases in sql server? : Sql server database administration
Explain triggers?