Back to problems

Write SQL for revenue and advertiser analyses

SQL · Meta · Medium

You are given two relations that describe ad-delivery activity and advertiser profiles. active_ads(date, ad_id, advertiser_id, creation_source, revenue) stores one row per ad per calendar day: creation_source is the channel the ad was produced through (values such as 'web', 'api', 'mobile'), and revenue is the money that ad earned on that day. advertiser_info(advertiser_id, advertiser_name, advertiser_country) holds exactly one row per advertiser. Assume the current date is…

Checking your access…