Re: query help - count

From: DA Morgan <damorgan_at_psoug.org>
Date: Fri, 10 Oct 2008 06:10:56 -0700
Message-ID: <1223644253.871717@bubbleator.drizzle.com>


Jake wrote:
> Sorry, I need to change how that is set up. Ignore previous post.
>
> it would be more like
>
> table1
> person_type
> person_id
>
>
> table2
> person_id
> appt_date
>
> and again... There is a one to many relationship between table 1 and
> table 2.
>
> where
>
> table1.person_id=table2.person_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.
>
> Here's the twist though, there is a condition on table one. say
> person_type=2. So, say I only want to get counts of the unique number
> of people on each day, but they only count when person_type=2.
>
> And, the results should be rows of:
> appt_date, count
> appt_date, count
>
> How would i do that? Thanks.

This is school work so you need to demonstrate some evidence that you have made an attempt at solving this yourself.

Post your best attempt as well as the full version number to three decimal places.

-- 
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan_at_x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Fri Oct 10 2008 - 08:10:56 CDT

Original text of this message