Interview Query

Email Campaign

0
Have you seen this question before?

Your company has begun a new email campaign. You have the tables below-detailing users visits to the site and timestamps of when emails were sent to users.

  1. How would you measure the success of this campaign?
  2. Write a query to analyze the success of your campaign.

Example:

Input:

users table

Column Type
id INTEGER

emails table

Column Type
id INTEGER
user_id INTEGER
sent_at DATETIME

user_sessions table

Column Type
session_id INTEGER
user_id INTEGER
created_at DATETIME
Next question: Different Card
.....
MySQL 8.0.17
Loading editor
Use Shift + Enter to run query