I have this query:
SELECT member_id AS dealer_id, dealer_name FROM client_information WHERE dealer_name <> '' AND member_id IS NOT NULL AND membership_status = '1' LIMIT 3
and I want it to also check if there are any active vehicles, if not then I want them to excluded from the search.
table name 'vehicle_data' and we could count where member_id = dealer_id AND active = '1'
Thanks for any help