Monthly Average Conversations Rating
Extracts the monthly average rating for conversations from the Intercom integration. It selects the truncated month and calculates the average rating for conversations that have a non-null rating value. The results are grouped by month and ordered in descending order.
- Grain
- See the notes
- Built from
- 1Raw tables
- 1Core
- 1Analytics
- Reads from Intercom
- conversation
- Ships as
- Weld and dbt SQL, open source on GitHub
1-- core.intercom.monthly_conversations_rating
2-- Monthly Average Conversations Rating. Extracts the monthly average rating for
3-- conversations from the Intercom integration. It selects the truncated month and
4-- calculates the average rating for conversations that have a non-null rating
5-- value. The results are grouped by month and ordered in descending order.
6--
7-- From the weld.app template library. Not reconciled against Intercom;
8-- check the output against the source before relying on it.
9
10select
11 date_trunc(conversation_rating_created_at, month) as month
12 , avg(conversation_rating_value) as average_rating
13from
14 {{raw.intercom.conversation}}
15where
16 conversation_rating_value is not null
17group by
18 month
19order by
20 month descThis model and the 1 it depends on. Deploy them together; refs like {{staging.…}} resolve to the matching folders in Weld, and the dbt view uses source() and ref().
How it counts. And where it stops.
The SQL template "Get Monthly Average Conversations Rating" is designed to retrieve the average rating of conversations on a monthly basis. It utilizes the integration with Intercom, a customer messaging platform. The SQL code begins by selecting the month and calculating the average conversation rating using the `date_trunc` and `avg` functions respectively. It then specifies the table `{{raw.intercom.conversation}}` from which the data is retrieved. The `where` clause ensures that only conversations with a non-null rating are considered. The results are grouped by month and ordered in descending order. This SQL template is useful for analyzing the average rating of conversations over time. It allows you to gain insights into the performance and satisfaction of conversations with customers. By aggregating the ratings on a monthly basis, you can identify trends, patterns, and potential areas for improvement in your customer interactions.
Raw tables it reads
- raw.intercom.conversation
Put Intercom in front
of your agents.
Connect Intercom, deploy the models, and ask questions in Claude, Cursor or ChatGPT. Free for 14 days, no credit card.