What is the Query to print out the individual total number of
duplicate row in sql.
Answer Posted / girija.112
ANS:
SELECT department_id,COUNT(department_id) AS "Occurrences"
FROM departments
GROUP BY department_id
HAVING ( COUNT(department_id) > 1 )
DEPARTMENT_ID Occurrences
------------- -----------
80 2
60 3
--In my 'departments' table , i have not assigned department_id column as a "primary key / unique key"
| Is This Answer Correct ? | 28 Yes | 3 No |
Post New Answer View All Answers
What is mdb stand for?
Is sql scripting language?
What are sql functions? Describe the different types of sql functions?
What is rank dense_rank and partition in sql?
What is relationship? How many types of relationship are there?
define data blocks ? : Sql dba
What is sql comments?
Enlist the advantages of sql.
What is the current version of postgresql?
How long does it take to learn pl sql?
The select into statement is most often used to create backup copies of tables or for archiving records?
Which are the different case manipulation functions in sql?
What do you mean by query optimization?
Can we rollback after truncate?
What is natural join in sql?