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 / krishna reddy l
select convert(varchar(5),ex)+'('+convert(varchar(5),count
(ex))+')' from example group by ex
Table name example and columna name ex
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What do you understand by mirroring?
What happens when converting big values to numeric data types?
What are the properties of primary key?
What are different types of statements that are supported by sql?
How to delete duplicate records based on single column from a table?
What is the maximum size of column in sql server?
Define outer join in sql server joins?
What is Federation Root Database?
Where can you add custom error messages to sql server?
How can we determine what objects a user-defined function depends upon?
When would you prefer to have a minimum number of indexes?
What are the new features of sql server 2008 r2 reporting service?
Explain relational data?
What are the fixed server level roles? : sql server security
Define right outer join in sql server joins?