Top Two Categories by Engagement Rate per Country

Given two tables:

events(event_id, user_id, pin_id, event_type, event_ts, country_code), where event_type is either impression or click.

pin_info(pin_id, category), which maps each Pin to ...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: