

-- users: One row per known (signed-up) user.
CREATE TABLE users (
  user_id INTEGER,
  first_name VARCHAR(255),
  last_name VARCHAR(255),
  signup_date DATE,
  country VARCHAR(255),
  plan VARCHAR(255)
);

INSERT INTO users (user_id, first_name, last_name, signup_date, country, plan) VALUES
  (1, 'Maya', 'Cole', '2024-05-01', 'GB', 'pro'),
  (2, 'Eli', 'Park', '2024-02-05', 'AU', 'pro'),
  (3, 'Priya', 'Shah', '2024-01-05', 'DE', 'free'),
  (4, 'Tom', 'Reed', '2024-02-02', 'DE', 'free'),
  (5, 'Sara', 'Lund', '2024-01-20', 'US', 'free'),
  (6, 'Jon', 'Diaz', '2024-04-08', 'CA', 'free'),
  (7, 'Ana', 'Roy', '2024-03-20', 'AU', 'pro'),
  (8, 'Kwame', 'Mensah', '2024-05-14', 'GB', 'pro'),
  (9, 'Lena', 'Vogt', '2024-06-20', 'CA', 'free'),
  (10, 'Raj', 'Nair', '2024-03-21', 'CA', 'pro'),
  (11, 'Iris', 'Frost', '2024-04-17', 'CA', 'pro'),
  (12, 'Ben', 'Hale', '2024-05-23', 'DE', 'free');

-- campaigns: Marketing campaigns with their channel and UTM tags.
CREATE TABLE campaigns (
  campaign_id INTEGER,
  campaign_name VARCHAR(255),
  channel VARCHAR(255),
  utm_source VARCHAR(255),
  utm_medium VARCHAR(255)
);

INSERT INTO campaigns (campaign_id, campaign_name, channel, utm_source, utm_medium) VALUES
  (1, 'Spring Launch', 'paid', 'google', 'cpc'),
  (2, 'Newsletter Drive', 'email', 'mailchimp', 'email'),
  (3, 'Social Promo', 'social', 'facebook', 'social'),
  (4, 'Retargeting', 'paid', 'google', 'display'),
  (5, 'Summer Sale', 'paid', 'bing', 'cpc');
