InterviewDB
Experience
·
Los Angeles
Top Spenders: Find the Top N Customers by Total Spend Using SQL and Python
phone
Interview Experience
Problem You have two tables: customers(id, name) and orders(id, customer_id, amount, created_at). Write a SQL query to find the top 5 customers by total spend, along with their order count and average order value. Example output: Follow-ups How would you modify the query to show top spenders per month using a window function? What index would you add to orders to speed up this aggregation? Rewrite this in Python using pandas from a DataFrame -- what is the equivalent groupby chain? How would you…
Full Details
🔒
Unlock all Cloudkitchens questions
Full insider details, leaked discussions, and candidate experiences.
Get full access — $100 a year, unlimited accessAbout This Question
This is a candidate experience report from a cloudkitchens interview during the phone round.