This week we will see how to create a Customer Retention report based on your CRM data. This lets you know how better you are engaging with your existing customers and make them continue buying products or services.
To create the customer retention report, you need to create the following Query Tables.
SELECT "Customer ID", STR_TO_DATE( min ( "Date of Subscription" ), '%Y-%m-%d' ) "Date" /* fetches the start date from subscription created time */ FROM "Invoice" GROUP BY "Customer ID" |
SELECT INV. "Invoice ID" "Invoice ID" , INV. "Date of Subscription" "Date" , INV. "Customer ID" "Customer ID" , INV. "Invoice Owner" "Invoice Owner" , STR_TO_DATE(CUS. "Date" , '%Y-%m-%d' ) 'Min Date' , date_format(CUS. "Date" , '%Y%m' ) "Month and Year" , /*Extracts the year and month */ period_diff(date_format(INV. "Date of Subscription" , '%Y%m' ), date_format(CUS. "Date" , ' %Y%m' )) ' Month' /*Finds the duration in months */ FROM "Customer Start Date" CUS INNER JOIN "Invoice" INV ON INV. "Customer ID" = CUS. "Customer ID" |
SELECT date_format( "Date" , '%Y%m' ) "Month and Year" , count ( "Customer ID" ) "Customer Count" FROM "Customer Start Date" GROUP BY "Month and Year" |
count("Invoice and Recurring Month"."Invoice ID")*100/avg("Customer Count by Month"."Customer Count") |