if we have a column (Key) in a table.
and values of that column is
Key
1
1
1
2
2
3
3
4
4
5
5
5
and we want to show the data after query..like..
1(3)
2(3)
3(2)
4(2)
5(3)
how many times a single term comes..
Answer Posted / javamaster
select key,count(key) from tablename
group by key order by key
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain what is the purpose of sql profiler in sql server?
what number files will a information contain in SQL Server? How many forms of information files exist in SQL Server? How many of those files can exist for a single database?
What is a mutating table error and how can you get around it?
What is normalization of database?
what are the important architecture components of SSRS?
What is scheduled job and how to create it?
Why the trigger fires multiple times in single login?
What are different types of statement?
How to create a new table in a given schema?
What are different types of join?
What is data source in connection string?
How to change a login name in ms sql server?
Explain few examples of RDBMS?
Can group by and orderby be used together?
When would you use an insert into .. Select option versus an insert into .. Values option? Give an example of each?