SQl query using NOT equal with count is not working

Viewed 32

in MySql not equal to is not working when we add COUNT

SELECT COUNT(DISTINCT p.patient_id) AS count FROM patient as p
            JOIN map_cohort_patient AS m ON m.patient_id = p.patient_id
            JOIN organization_patient_id_int AS o ON o.patient_id=p.patient_id
            JOIN contributor_individual AS ci ON ci.patient_id = p.patient_id
            WHERE m.cohort_id = UUID_TO_BIN_F('1234') AND contr_type != 227
0 Answers
Related