Question
Back to all questions

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.

Tags

Data Analyst
Marketer
General
SQL

Structure your query using JOIN, WHERE, GROUP BY and HAVING clauses. Consider how to calculate the date range for 'last month' and ensure proper filtering for location and order count.

Companies Asking this quesiton.

Hard Difficulty

Hard questions require advanced understanding and critical thinking. Here, your problem-solving skills are key, as these questions often involve complex scenarios needing in-depth analysis and well-structured responses.

SQL question

SQL questions test your ability to work with relational databases. Demonstrate your proficiency in writing queries, understanding database design, optimizing performance, and extracting meaningful information from structured data.

Leaderboard for SQL Query for Average Order Value?”