David McAfee
davidmcafee at gmail.com
Thu Nov 3 11:49:07 CDT 2011
SELECT Uitv, Sub, COUNT(Patient) AS UniquePatient FROM tblSomeTable GROUP BY Uitv, Sub ORDER BY Uitv, Sub On Thu, Nov 3, 2011 at 2:43 AM, <pedro at plex.nl> wrote: > Dear Group, > > how can i query the unique patients, from "Uitv" and "Sub". > > Data > > Uitv Sub Patient > A ee 101 > A ee 101 > A ee 102 > A ff 201 > A gg 301 > B ee 201 > B ee 301 > B hh 501 > > > > Result > > Uitv Sub Unique Patient > A ee 2 > A ff 1 > A gg 1 > B ee 2 > B hh 1 > > > Thanks > > Pedro Janssen > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >