how to compute the kpi using sql
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


how to compute the kpi using sql Expand / Collapse
Author
Message
Posted 8/18/2007 9:32:08 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 6/26/2008 8:43:15 AM
Posts: 5, Visits: 15
Hi,I need to compute a kpi named "Low-grade Silent Customers"
which means customers that haven't use our specific service for
3 months to 1 year.In our data warehouse,we store specific service
usage records in separate tables by month,and each table has more
than one hundred million recodes,who can give me a smart sql?
Post #8597
Posted 11/29/2007 4:27:10 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 11/29/2007 5:48:26 AM
Posts: 1, Visits: 4
A bit late but maybe you can try to look in the following direction:
select distinct customers from month_12_table
union
select distinct customers from month_11_table
union
.....
.....
union
select distinct customers from month_3_table
minus
select distinct customers from month_2_table
minus
select distinct customers from month_1_table
minus
select distinct customers from month_0_table


Oscar
Post #9909
Posted 11/30/2007 1:52:29 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 6/26/2008 8:43:15 AM
Posts: 5, Visits: 15
thanks,ohuibers,
i haved solved the problem the same way as your advice
Post #9918
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 10:34pm

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.047. 12 queries. Compression Disabled.