SELECT
cd.id AS `Client ID`,
CONCAT(cd.firstname,' ',cd.lastname) AS `Client`
FROM hb_client_details cd
WHERE cd.id NOT IN (SELECT client_id FROM hb_accounts WHERE status='Active')
AND cd.id NOT IN (SELECT client_id FROM hb_domains WHERE status='Active')
AND cd.id NOT IN (SELECT a.client_id FROM hb_accounts a JOIN hb_accounts_addons ad ON (ad.account_id=a.id) WHERE ad.status='Active')
ORDER BY cd.id ASC