Debug info:(0)
SELECT DISTINCT * FROM innodb.therapists WHERE is_deleted=0 AND memberships IS NOT NULL AND status=3 AND medical_professional_type not in('therapist_listing') AND (medical_professional_type='Therapist' OR medical_professional_type='treatment_facility') AND formid=4 # HAVING medical_professional_type='Therapist' AND status=3 AND medical_professional_type NOT IN ('therapist_listing','school_professional') GROUP BY therapistid ORDER BY therapist_results_sort_order