How to get the count of distinct records. Please give me the
query?

Answer Posted / pradyumna

select distinct colname,count(colname) from tbl group by
colname

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are indexers?

718


How do I find the sql server version?

617


Do you have any idea about the tcl commands?

629


What is SQL Azure Firewall?

124


What is the difference between locking and multi-versioning?

622






Explain subquery and state its properties?

630


What are the differences between ms sql server & oracle?

636


What is the difference between left and right outer join?

622


What is the default schema of your login session in ms sql server?

674


Do you know what is a linked server in sql server?

639


Explain the disadvantages/limitation of the cursor?

640


What are the advantages of paper records?

649


How are the unique and primary key constraints different?

690


When multiple after triggers are attached to sql table, how to control the order of execution?

628


What is report snapshot?

113