Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Counting unique customers per day, week, month, year..

Re: Counting unique customers per day, week, month, year..

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Fri, 15 Apr 2005 16:22:21 -0700
Message-ID: <1113607117.947617@yasure>


NetComrade wrote:

> Is there are some oracle features that allow me to do this?
>
> e.g.
> let's say i have a table
> orders:
> product_id, customer_id, date
> 1 10 01-01-2005
> 2 10 01-02-2005
> 1 12 01-01-2005
> 4 13 01-04-2005
>
> product_groups
> product_id group_id
> 1 2
> 2 2
> 4 1
>
> .. you get the idea
>
> I'd like to figure out
> unique customers per product per date
> unique customers per product per month
> unique customers per product per year
> unique customers per product_grou per date
>
> Basically, just b/c you have 100 unique customers on jan 1, and 100
> unique customers on jan 2nd, doesn't mean that you have 200 unique
> customers between those 2 dates, and you'd have to come up with
> different queries to figure this out, but since there are so many
> possible combinations (e.g. you can add other attributes to products
> besides groups, like order came through partner), I figured there has
> to be some features to help us out.
>
> Thanks.
> .......
> We use Oracle 8.1.7.4 and 9.2.0.5 on Solaris 2.7 boxes
> remove NSPAM to email

http://www.psoug.org
click on Morgan's Library
click on GROUP BY

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Fri Apr 15 2005 - 18:22:21 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US