You're not doing a count distinct, so if your opd_patient_queue_log can have the same patient_id more than once, that'd be why you get a difference.
-Darius On Fri, Aug 19, 2011 at 5:37 AM, Bob Jolliffe <[email protected]> wrote: > I am trying to compose an indicator which makes use of a join with a > custom table. > > Does anyone have an idea why executing the query directly as: > mysql -u ... -e 'Select count(patient.patient_id) from patient inner > join opd_patient_queue_log on > patient.patient_id=opd_patient_queue_log.patient_id' > > results in 16593, > > but when I create a sql cohort query as above (without the count), I > get a result of 13592. > > How does openmrs count the size of the resultset? It seems its not a > simple count ... > > Regards > Bob > > _________________________________________ > > To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to > [email protected] with "SIGNOFF openmrs-devel-l" in the body > (not the subject) of your e-mail. > > [mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l] > _________________________________________ To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [email protected] with "SIGNOFF openmrs-devel-l" in the body (not the subject) of your e-mail. [mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]

