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
✓ Trusted by Data Scientists

Stop Winging It. Start Using Frameworks.

The structured approach to acing interviews

Proven frameworks for analytics cases, ML, and experimentation
See adequate vs great answers side-by-side
Real case breakdowns with expert analysis
Master storytelling and advanced interview skills

This course taught me the difference between answering questions and nailing interviews. The frameworks are pure gold.

— David L., ML Engineer

Start Learning Now →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 Squarespace, Cognizant, Cisco 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.