• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1788
  • 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

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

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