Skip to main content

Peliqan

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
Lists

Brevo
Folders

Brevo
Sms Campaigns

Brevo
Whatsapp Campaigns

Brevo
Email Campaigns

Brevo
Contacts

Brevo
Attributes

Brevo
Campaign Statistics

Ready to get instant access to all your company data ?​

Connect 300+ sources, serve any BI tool, and give every AI agent one governed endpoint to read, and write back where the app supports it.