There are two pandas DataFrames: orders with columns order_id, user_id, and amount, and users with columns user_id and country. Write a function revenue_by_country that takes both DataFrames and returns a DataFrame with the country, the number of unique buyers, and the total revenue, sorted by revenue in descending order.
~15 min by voice
How to approach it
They're checking whether you can build an aggregate from two tables without losing or double-counting data: choose the right merge type, handle missing values before groupby, and tell the number of orders apart from the number of unique buyers.
The interviewer will ask this question and listen. Think out loud and ask for a hint if you need one. When you're done, pause or tap “That's my answer”. In about a minute, your score and the points you covered show up here.