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

Answer Posted / gouri

SELECT count(*) FROM
(SELECT distinct ngcode FROM donation )d

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain primary key?

625


Do you know what is bit data type and whats the information that can be stored inside a bit column?

647


What is subquery explain with example?

706


Data is not being delivered to subscribers, what can be the possible reasons? : sql server replication

644


How to add the custom code in Report?

105






What is after dml trigger?

664


how to take backup bcp out for a column in table in sql server?

1716


What is the difference between cartesian product and cross join?

576


We are updating a field in sql and alter the row also.after giving the commit command the system is crashed.what will happen to the commands given,whether it will update and alter the table or not?

993


do views contain data ?

666


Do you know what is difference between index seek vs. Index scan?

598


What is right outer join in sql server joins?

774


How do I partition a table in sql server?

625


How do I determine how many instances of sql server are installed on a computer?

620


there is a trigger defined for insert operations on a table, in an oltp system. The trigger is written to instantiate a com object and pass the newly inserted rows to it for some custom processing. What do you think of this implementation? Can this be implemented better? : Sql server database administration

563