Payments Received

Start Timer

0:00:00

Upvote
19
Downvote
Save question
Mark as completed
View comments (59)

You’re given two tables, payments and users. The payments table holds all payments between users with the payment_state column consisting of either "success" or "failed"

How many customers that signed up in January 2020 had a combined (successful) sending and receiving volume greater than $100 in their first 30 days?

Note: The sender_id and recipient_id both represent the user_id.

payments table

Column Type
payment_id INTEGER
sender_id INTEGER
recipient_id INTEGER
created_at DATETIME
payment_state VARCHAR
amount_cents INTEGER

users table

Column Type
id INTEGER
created_at DATETIME

Output:

Column Type
num_customers INTEGER
.
.
.
.
.


Comments

Loading comments