Does anyone have any experience writng SQL to get a compund growth rate? I would like to calculate CGR over time at any level in the table:
Examples:
single product/single customer
multiple product/single customer
single product/multiple customer
multiple product/multiple customer
The table structure would be in the following format
I am currently bringing the data into excel to do and would like to incorporate the logic to sql.
Any help would be greatly appreciated.
Examples:
single product/single customer
multiple product/single customer
single product/multiple customer
multiple product/multiple customer
The table structure would be in the following format
Code:
date product customer sales
1/1/05 prd1 cust1 10
1/3/05 prd1 cust1 15
1/8/05 prd1 cust1 7
1/11/05 prd1 cust1 20
1/3/05 prd2 cust1 17
1/7/05 prd2 cust1 27
1/3/05 prd2 cust2 10
1/7/05 prd2 cust2 45
I am currently bringing the data into excel to do and would like to incorporate the logic to sql.
Any help would be greatly appreciated.