Interview Query

Customer Orders

12
Have you seen this question before?

Write a query to identify customers who placed more than three transactions each in both 2019 and 2020.

Example:

Input:

transactions table

Column Type
id INTEGER
user_id INTEGER
created_at DATETIME
product_id INTEGER
quantity INTEGER

users table

Column Type
id INTEGER
name VARCHAR

  Output:

Column Type
customer_name VARCHAR
Next question: Food Delivery Times
.....
MySQL 8.0.17
Loading editor
Use Shift + Enter to run query