You are here:
Metrics on Metrics
Organize complex Calculated Insights (CI) SQL data into logical steps and stitch powerful workflows. With metrics on metrics you can improve and reuse metrics for multiple scenarios.
You can create metrics in your metrics for more complex expressions in Calculated Insights. Build comprehensive insights such as customer engagement scores, health scores, and attribution scores. And you get metrics with calculations at multiple levels.
You can use the capability to build higher scores and improve metric reuse such as to calculate the email open count per customer.
SELECT
COUNT(ssot_EmailEngagement_dlm.ssot_Id_c) as email_open_count_c,
ssot_Individual_dlm.ssot_Id_c as customer_id_c
FROM
ssot_Individual_dlm
JOIN ssot_EmailEngagement_dlm
on (ssot_Individual_dlm.ssot_Id_c = ssot_EmailEngagement_dlm.ssot_IndividualId_c)
WHERE ssot_EmailEngagement_dlm.ssot_EngagementChannelActionId_c = ‘Open’
GROUP BY customer_id__c
Then use the metrics (Email_Open_Count) to create another
calculated insight to group customers.
SELECT
NTILE (50) over (ORDER BY SUM( NTO_Email_Open_Count_cio.email_open_count_c ) desc) as
customerengagementbuckets_c,
NTO_Email_Open_Count_cio.customer_id_c as customer_id_c
FROM
NTO_Email_Open_Count_cio
GROUP BY customer_id__c

