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 ? | 1 Yes | 5 No |
Post New Answer View All Answers
Is INSTEAD OF trigger directly applicable to Table ?
What are the elements of dbms?
What is it unwise to create wide clustered index keys?
List few advantages of stored procedure.
What languages bi uses to achieve the goal?
Tell me about pre-defined functions of sql?
What are the tables in sql?
How do I open a .db file?
Can we store videos inside the sql server table?
What is the difference between varchar and nvarchar datatypes?
How many joins in sql server?
What do you understand by the analysis services in sql server?
Explain use of expression builder.
Which are the two editions in which SQL Azure database available?
What is the order in which the sql query is executed?