Hi there,
From a customer database table, I need to get a list of all the customers
that have the same birthdays and their names.
While I can get a count of this and the name of one of the customers of the
group sharing the same birthday by using the following code:
SELECT ALL count(dob) AS DOBcount, dob, firstname, lastname
FROM accounts
GROUP BY dob
HAVING DOBcount > 1
example output...
2, 1960-1-1 , john, smith
3, 1961-2-1, maggie, johnson
This only gives me one name from the list of people who share the same
birthdate. So in the above example we can see that two people in the DB are
born on 1960-1-1, but we cannot see who the other one is?
Is there a way to make the SQL, only show the groups having a count of more
then 1 for sharing a birthday, but when it does show these, it lists them
all?
Kind regards
Dave