Weld logo
intercom
Intercom

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.
1select
2    date_trunc(conversation_rating_created_at, month) as month
3  , avg(conversation_rating_value) as average_rating
4from
5    {{raw.intercom.conversation}}
6where
7    conversation_rating_value is not null
8group by
9    month
10order by
11    month desc
Example of output from model:

+---------------------+----------------+
|        month        | average_rating |
+---------------------+----------------+
|      2022-06-01     |      4.5       |
|      2022-05-01     |      4.2       |
|      2022-04-01     |      4.8       |
|      2022-03-01     |      4.6       |
+---------------------+----------------+

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.

Ready to start modeling your own intercom data?

Get started building your data warehouse with intercom and 100+ more apps and databases available.

intercom
Weld logo
Sign up for free
Weld logo

Tired of scattered data? Sync your data in minutes with Weld. Connect to 150+ apps, files and databases.

Backed by leading investors
Frontline logoCherry logoInnnovation Fund logo
Twitter LogoLinkedIn Logo
GDPR logoSOC2
© 2024 Weld. All rights reserved.