@Anmoldalmia: SELECT distinct user_name FROM user WHERE user_id in (select ug_user from user_groups where ug_group = "bot")