Brevo

Campaign performance by contact

SQL query for Brevo

Calculate the performance metrics (open rate, click rate, response rate) for each contact.

SELECT contact_id, AVG(open_rate) AS avg_open_rate, AVG(click_rate) AS avg_click_rate, AVG(response_rate) AS avg_response_rate FROM (SELECT contact_id, IFNULL(opened, 0) AS open_rate, IFNULL(clicked, 0) AS click_rate, IFNULL(response, 0) AS response_rate FROM (SELECT contact_id, CASE WHEN opened_at IS NOT NULL THEN 1 ELSE 0 END AS opened, CASE WHEN clicked_at IS NOT NULL THEN 1 ELSE 0 END AS clicked, CASE WHEN responded_at IS NOT NULL THEN 1 ELSE 0 END AS responded FROM email_campaigns) AS campaign_performance) AS contact_performance GROUP BY contact_id

Brevo data model

Brevo
Table Lists

Brevo
Table Folders

Brevo
Table Sms Campaigns

Brevo
Table Whatsapp Campaigns

Brevo
Table Email Campaigns

Brevo
Table Contacts

Brevo
Table Attributes

Brevo
Table Campaign Statistics

SQL - Combine data

Magical SQL for Brevo with Peliqan.io

Explore data in a rich spreadsheet UI. Use Magical SQL to combine and transform data. SQL queries become new tables that can be shared with business users and used in any BI tool such as Microsoft Power BI, Tableau or Metabase.

Let AI do the work for you

Let AI do the work for you

Peliqan’s AI assistant helps you to write SQL queries to get to insights fast. Ask your question in plain English and immediately see the result in Peliqan’s rich spreadsheet viewer.

Peliqan Overview

Ready to get instant access to
all your company data ?