Amazon
- Server Utilization Time
"Given a table containing server start and stop timestamps for multiple servers, write a query to calculate the total uptime (in full days) for each server. Assume a server can start and stop multiple times." - Highest-Grossing Items
"You have an orders table with item_id, quantity, and price. Write a query to find the top 5 items that generated the most total revenue." - User Shopping Sprees
"Given a purchase history table with timestamps, identify users who made multiple purchases within a short span (e.g., within 30 minutes). List these users and how many sprees they had." - Average Review Ratings
"From a reviews table (product_id, rating), write a query to compute the average rating per product, and return only those products with more than 50 reviews." - Maximize Prime Item Inventory
"Using historical daily sales data for Prime items, predict the minimum inventory needed to avoid stockouts based on an average daily sales figure."
- Median Google Search Frequency
"Given a table summarizing how many searches each user made per day, write a query to find the median number of searches." - Odd and Even Measurements
"You have a table of sensor measurements. Separate the data into odd and even measurement IDs and calculate the average measurement value for each group." - Median of Search Queries
"Given users' total number of searches in a month, write a query to determine the median number of searches submitted." - Top Search Keywords
"Using a search_logs table (user_id, keyword), write a query to find the top 10 most searched keywords." - Search Query Trends
"Analyze how search query volumes change over time (daily, weekly, or monthly). Write a query that shows the number of searches over each time period."
Meta (Facebook)
- Average Post Hiatus
"Given user posts with post timestamps, calculate the average number of days between consecutive posts for each user." - Advertiser Status
"Given campaign start and end dates, identify advertisers who haven't had any active campaigns in the past 30 days and mark them as 'Inactive'." - Number of Comments Per User
"Using a comments table (user_id, post_id, comment_timestamp), find how many comments each user has made in the past year." - User Engagement Metrics
"Write a query that calculates total likes, total comments, and total shares for each user across all their posts." - Friend Recommendation System
"Given a user-friendship table, suggest friends by finding users who share at least 2 mutual friends but are not already directly connected."
Stripe
- Repeated Payments
"Identify all cases where the same user made two payments with the same amount and same merchant within 10 minutes of each other." - Transaction Anomalies
"Write a query to detect potential fraudulent transactions — specifically looking for users who made purchases above 2x their average spend within a week." - Merchant Performance
"Calculate the success rate of each merchant's transactions (number of successful transactions divided by total attempted transactions)." - Customer Retention Analysis
"Determine how many users made repeat purchases within 30 days of their first transaction." - Payment Method Preferences
"Find the most commonly used payment method (credit card, PayPal, etc.) for each customer based on their transaction history."
Microsoft
- Teams Power Users
"Using Teams activity data (messages sent, meetings joined), identify the top 5% most active users." - Supercloud Customer Analysis
"Using Supercloud usage logs (compute hours, storage used), write a query to find customers with the highest resource consumption." - Product Usage Metrics
"Analyze logins and usage across multiple Microsoft products (Outlook, Teams, Excel). Find the top 3 most used products per user." - License Utilization
"Given tables for assigned licenses and active user logs, calculate what percentage of software licenses are actually being used." - User Activity Trends
"Group user activities (logins, file uploads) weekly. Plot user engagement trends across the last 6 months."
Netflix
- Content Streaming Patterns
"Given watch history data (user_id, content_id, timestamp), find which hours of the day have the highest number of streams." - Subscription Retention
"Write a query that tracks how many users continue their subscriptions 30, 60, and 90 days after joining Netflix." - Genre Popularity Analysis
"Using a table of shows watched (user_id, show_id, genre), count total watches per genre and rank genres by popularity." - User Watchlist Behavior
"Analyze the behavior of users on the Watchlist feature: how many items they add, how many they actually watch, and how long they keep them unwatched." - Recommendation System Efficiency
"Given recommendation and watch logs, calculate the ratio of recommended content that was actually watched by users within 7 days of the recommendation."