Complicated Query

From: <artmerar_at_yahoo.com>
Date: Fri, 12 Sep 2008 16:53:32 -0700 (PDT)
Message-ID: <a3c73b2a-81fb-48bb-bd25-f96d8825fa70@m36g2000hse.googlegroups.com>

Hi,

I'm trying to write a complicted query, maybe someone can help. Here is the table:

ACTION
DATE
PRODUCT The ACTION column contains 2 values (A, D). What I want to do is to get a count, by PRODUCT for each ACTION type for each MONTH range.

So, a count for product 1 with an action of A for 8/1/08 - 8/31/08. Then, a count for product 1 with an action of D for 8/1/08 - 8/31/08.

So, a count for product 2 with an action of A for 8/1/08 - 8/31/08. Then, a count for product 2 with an action of D for 8/1/08 - 8/31/08.

Etc.....

I think this can be done with an analytical function of some sorts, rather than writing some PL/SQL code. I'm searching, but maybe someone else can help......

Thank you much! Received on Fri Sep 12 2008 - 18:53:32 CDT

Original text of this message