VeriskOA #2
Campaign Engagement Report (SQL)
估计简单评测数据准备中,可先阅读题面
考点(AI 标注)SQL
A marketing company tracks advertising campaigns and engagements. Generate a report that, for every active campaign, lists the campaign name, the total number of engagements, and the combined sum of views and clicks. Columns: campaign_name | total_engagements | total_views_and_clicks. Sort by campaign_name ascending.
Schema:
campaigns
| name | type | description |
|---|---|---|
| id | INT PK | campaign id |
| name | VARCHAR(255) | campaign name |
| is_active | SMALLINT | 1 if active, 0 if inactive |
engagements
| name | type | description |
|---|---|---|
| campaign_id | INT FK | reference to campaigns(id) |
| views | INT | views count |
| clicks | INT | clicks count |