Finding Duplicate Row with Count Numbers
Suppose a table is given
ID Name Age
-----------------
1 Jon 30
2 Skeet 30
1 Jon 30
4 Gravell 30
5 NULL 30
4 Gravell 30
5 NULL 30
7 James 40
Required output (NULL also should comparable)
ID Name Age Description
----------------- -----------
1 Jon 30 Found 1
1 Jon 30 Found 2
4 Gravell 30 Found 1
4 Gravell 30 Found 2
5 NULL 30 Found 1
5 NULL 30 Found 2
7 James 40 Found 1
2 Skeet 30 Found 1
For finding duplicates I can execute the query
select ID,Name,Age from tableA group by ID,Name,Age having count(*) >1
How to generate the description?