Save 25%Black Friday: 25% off all plans — use code BLACKFRIDAY2026 at checkout. Ends Friday, Dec 4.Claim the deal

Table: ad

+---------------+------+
| Column        | Type |
+---------------+------+
| ad_id         | int  |
| advertiser_id | int  |
| campaign_id   | int  |
+---------------+------+

Table: impression

+---------------+--------------+
| Column        | Type         |
+---------------+--------------+
| impression_id | int          |
| ad_id         | int          |
| user_id       | int          |
| ts            | varchar(255) |
+---------------+--------------+

Table: conversion

+---------------+--------------+
| Column        | Type         |
+---------------+--------------+
| conversion_id | int          |
| impression_id | int          |
| ts            | varchar(255) |
| revenue       | float        |
+---------------+--------------+

impression_id is the primary key of impression. conversion_id is the primary key of conversion.

Test Cases
Input
-
Output
-
Expected
-