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
What is difference between getdate and sysdatetime in sql server 2008?
What are the steps to follow to configure SQL*Net?
What is log shipping? Can we do logshipping with SQL Server 7.0 ?
What are a scheduled jobs or what is a scheduled tasks?
Can we insert data if clustered index is disabled?
How do I start sql server 2016?
Please explain go command in sql server?
How to get the definition of a stored procedure back?
What are four major operators that can be used to combine conditions on a where clause?
If you're given a raw data table, how would perform etl (extract, transform, load) with sql to obtain the data in a desired format?
Do you know what are the reporting services components?
Explain how dts is used to extract, transform and consolidate data?
What do you understand by user-defined function in the sql server?
What are different replication agents and what's their purpose? : sql server replication
How can windows applications connect to sql servers via odbc?