Interview Query

Transactions in the Last 5 Days

Upvote
3
Downvote
Save
Mark Completed
Have you seen this question before?

Let’s say you work at a bank.

Using the bank_transactions table, find how many users made at least one transaction each day in the first five days of January 2020.

bank_transactions table

Column Type
user_id INTEGER
created_at DATETIME
transaction_value FLOAT
id INTEGER

Output:

Column Type
number_of_users INTEGER
Next question: Month Over Month
.....
Loading editor
Use Shift + Enter to run

Comments

Loading comments