marketing database challenge
Date: 2000/03/28
Message-ID: <8br9p1$u4b$1_at_nnrp1.deja.com>#1/1
We have a normalized database table showing product relationships per
customer. The format includes customer_id and product_id. For sake of
argument, let's say that the company only sells three different types
of products... therefore, customers can have one, two, or three records
in the product_relationship table, depending on which products they
have purchased.
The challenge is how to create a de-normalized view of this table so
that Marketing end users can easily analyze customers by number of
relationships. From an SQL perspective, this can be done through
subqueries. However, I'm trying to find a way to make this 'dummyproof'
for end-users.
One way to accomplish this might be to create a view that would look
like the below:
customer_id prod_A_ind prod_b_ind prod_c_ind
Does anyone know the best way (most efficient SQL) to go from the
normalized table to the above?
Any other ideas on how to solve this problem... especially given a
situation where new product types could be added on any given day?
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Mar 28 2000 - 00:00:00 CEST