select count(account),account from acmast where type in(1,2) group by account having count(account) > 1 select * from account where account = '' duplicate user found--- ---select appusername, count(*) from appuser group by appuser having count(*)>1