Groups Table:
id (int) 11
title (varchar) 50
AddressBook Table:
id (int) 11
username (varchar) 50
mobile (int) 16
some times I have the same user in the same or another group
so I want to know who has more than 1 record and where it is
later on I will delete it from my address book.
Sample Data:
1 ------- John -------- 187777744 ( Group# 1 )
2 ------- Dad --------- 184000002 ( Group# 1 )
3 ------- Mark -------- 143333321 ( Group# 1 )
4 ------- Dr.Mark -------- 143333321 ( Group# 2 )
5 ------- Mr.Mark -------- 143333321 ( Group# 3 )
The query should return the last 3 rows for user mark only.