cswork / OA打开练习工作台

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

nametypedescription
idINT PKcampaign id
nameVARCHAR(255)campaign name
is_activeSMALLINT1 if active, 0 if inactive

engagements

nametypedescription
campaign_idINT FKreference to campaigns(id)
viewsINTviews count
clicksINTclicks count