Last active
July 29, 2024 12:13
-
-
Save remilapeyre/7bfd0eaf9fe67b420bc4995c38325c86 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tables: | |
- User (user_id varchar, user_name varchar, user_email varchar) | |
- Order (order_id varchar, user_id varchar, date timestamp) | |
- Product (product_id varchar, product_name varchar, price integer) | |
- ProductOrder (order_id varchar, product_id varchar, quantity integer) | |
Write the SQL query to get for each user the 5 products they ordered the most over the last 7 days. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment