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

Can you create a logon trigger in sql server 2005 express edition?

569


How can you check the version of sql server?

553


What do mean by xml datatype?

610


Why union all is faster than union?

504


What is user defined datatypes and when you should go for them?

573






Explain where clause?

533


Explain the difference between control flow and data flow?

524


What is constraints and its types?

495


What is the difference between web edition and business edition?

89


Describe the functionalities that views support.

648


How to handle error or exception in sql?

520


Explain what are partitioned views and distributed partitioned views?

575


What are the default system databases in sql server 2000?

533


What is DCL?

585


Explain log shipping?

579