Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1781
  • Last Modified:

using greater than function in db2

hi friends

i have a query in db2 like this

select A.FIRST_NAME, A.LAST_NAME, count(A.ID)
from schema.USERS A where count(A.ID) > 1
GROUP BY A.FIRST_NAME, A.LAST_NAME;


basically i want to retrieve first names and last names of those who have more than one
Id.


a person can have more than one Id . example data

firstname     lastname     userid

raj                  becker       100
raj                  becker       200
sam                 raian        300

but in the query :: count(A.ID) > 1  doesnt seem to work

any ideas greatly appreciated

thanx
J
0
jaggernat
Asked:
jaggernat
  • 2
1 Solution
 
awking00Commented:
See attached.
count.txt
0
 
jaggernatAuthor Commented:
that was great!!

thank you.
J
0
 
awking00Commented:
Glad to help.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now