SQL

Suppose you have two tables, "orders" and "customers", where "orders" contains information about orders and "customers" contains information about customers. Write an SQL query that calculates the average order value for each customer who has made at least 3 orders in the last month, and only includes customers who are located in the United States. The query should require a join between the two tables.

Was asked at

Practice this question with AI

First session is free - no credit card required.

Go Premium

More interviews, more skills, more success.

Practice More Questions

Community Answers

1 answer from the community

Unlock Community Insights

Share your approach to this question and unlock all community answers with detailed insights

Give & Take

Everything You Need to Ace DS Interviews

Frameworks, real cases, and advanced techniques

Proven Frameworks
Structured approaches that work every time
Adequate vs Great Analysis
Learn exactly what makes answers stand out
Real Case Breakdowns
Expert commentary on actual interviews
Advanced Storytelling
Master impactful delivery & presence
See Full Curriculum →

1 interview answer published by candidate; last submission on Oct 10 2024, 10:26pm GMT.Interview question asked to Data Scientists interviewing at Nokia, YouTube, Quora and others: Suppose you have two tables, "orders" and "customers", where "orders" contains information about orders and "customers" contains information about customers. Write an SQL query that calculates the average order value for each customer who has made at least 3 orders in the last month, and only includes customers who are located in the United States. The query should require a join between the two tables.. Last reported: Nov 5 2024, 2:18pm GMT.