Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
I want to count only duplicate id's.
Ex:
id
1
2
3
4
5
1
2
1
3
2.
In above 1,2,3 id are repeating so my output count should be:3
How we can calculate????
Hi Sampath,
Use Group by in the Load statement
Data:
LOAD
ID,
*
FROM Table;
INNER JOIN(Data)
LOAD
*
WHERE IDCount > 1;
LOAD
ID,
Count(DISTINCT ID) AS IDCount
RESIDENT Data
GROUP BY ID;
Hope this helps you.
Regards,
Jagan.