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 / hitesh kumar vyas s
Take a example as to find the same student who got first and
second marks in each of sub.
SELECT RollNo,COUNT(Rank) FROM Student GROUP BY RollNo,rank
ORDER BY rank
| Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
What is replication with database mirroring? : sql server database administration
What are the database objects? : SQL Server Architecture
Are there any preferred steps that need to be taken care of before starting the installation of sql server 2000?
What stored by the model?
What is the difference between the export /import functions in sql studio and standalone sql manager? : sql server management studio
Can we add a cpu to sql server?
Explain transaction isolation levels in sql server?
What are the system database in sql server 2008?
Can you please explain the difference between primary keys and foreign keys?
What are different types of join?
How do you make a trace?
Can sql server be linked with other servers like oracle?
What are date and time data types in ms sql server?
What guidelines should be followed to help minimize deadlocks?
What is isnull() operator?