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 are the authentication modes in sql server? : Sql dba
What are the sql commands?
What is sqlservr exe?
Is hadoop a nosql?
What is offset in sql query?
What are the different types of constraints?
Where the sql database files are stored?
What is an index? What are the types of indexes? How many clustered indexes can be created on a table?
What is query execution plan in sql?
How consistent is the view of the data between and within multiple sessions, transactions or statements ?
What are the packages in pl sql?
i have a column which may contain this kind of value: 123*67_80,12*8889_5,34*8_874 ,12*7_7 (can contain space before a comma, and this string length can be anything) now i want to split this value into two column like: column1: 123*67,12*8889,34*8,12*7 column2: 80,5,874,7 use function for this
Is like operator in sql case sensitive?
Is not equal in sql?
Is and as keyword in pl sql?