SPUFI Question - only display counts > 1



IBM's flagship relational database management system

SPUFI Question - only display counts > 1

Postby dp3546dp3546 » Sun May 23, 2010 7:18 am

How can I change this SQL to only display records where the count > 1

SELECT COUNT(*),
NAME
FROM TABLEA A
GROUP BY NAME;
dp3546dp3546
 
Posts: 3
Joined: Sun May 23, 2010 7:09 am
Has thanked: 0 time
Been thanked: 0 time

Re: SPUFI Question - only display counts > 1

Postby dp3546dp3546 » Sun May 23, 2010 9:29 am

I think I found it. just add this to the end

HAVING COUNT(*) > 1;
dp3546dp3546
 
Posts: 3
Joined: Sun May 23, 2010 7:09 am
Has thanked: 0 time
Been thanked: 0 time


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post