query help - count

From: Jake <jgarfield_at_earthlink.net>
Date: Thu, 9 Oct 2008 17:30:32 -0700 (PDT)
Message-ID: <14f67d7d-535a-4238-a896-680742d204de@v28g2000hsv.googlegroups.com>


Let's say I have 2 tables:

table1
person_id
appt_id

table2
appt_id
appt_date

(greatly simplified)

There is a one to many relationship between table 1 and table 2.

where

table1.appt_id=table2.appt_id

I would like to get a count of unique people in table1 for each appt_date in table2. Keep in mind that each person may have more than one appt in a single day.

So, the results should be rows of:
appt_date, count
appt_date, count
...

How would i do that? Thanks. Received on Thu Oct 09 2008 - 19:30:32 CDT

Original text of this message