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 is a view in sql?

582


What is the contrast between sql and pl/sql?

623


What are the rules to use the rowguidcol property to define a globally unique identifier column?

593


Explain the use of containers in ssis?

536


Tell me what is log shipping?

573






How do we Backup SQL Azure Data?

86


When columns are added to existing tables, what do they initially contain?

629


How can we use ConnectorJ JDBC Driver with MS SQL?

568


What are the advantages of sql azure?

116


What is hierarchy, what are its types and difference between them? : sql server analysis services, ssas

702


What is executereader?

553


What is the difference between Stored Procedures and triggers?

576


What are the pre-defined functions in the sql server?

522


How to list all user defined functions in the current database?

518


Can we add an identity column to decimal datatype?

586