my @accounts = @{$dbh->selectcol_arrayref("SELECT `UserName` FROM Account a, asscAccountAccountGroup aaag, asscRoleAccountGroup arag, Role r WHERE a.Id = aaag.AccountId AND aaag.AccountGroupId = arag.AccountGroupId AND arag.RoleId = r.Id AND r.Name = 'ROLE_REVIEWER'")}; print join("\n",@accounts);