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 / vikas kant
select key,count(key1) from [table_name]
group by key
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What are the different index configurations a table can have?
Do you know what are the reporting services components?
Difference between group by clause and having clause in SQL?
What is right outer join in sql server joins?
Explain primary key, foreign key and unique key?
What does REVERT do in SQL Server 2005?
Explain the difference between control flow and data flow?
in the physical file layout, where should the transaction log be stored in relation to the data file? : Sql server administration
Define outer join?
What is an example of a foreign key?
Explain what are page splits? : SQL Server Architecture
How do you create a data source?
What is a linked server in sql server?
What is cdc in sql server?
After creating the cube, if we added a new column to the oltp table then how you add this new attribute to the cube? : sql server analysis services, ssas