Identify users who made a purchase within 24 hours of receiving a promotional text, ensuring you account for duplicate messages.
Use the provided Attentive-style user, promotional message, and purchase data. Treat the 24-hour boundary as inclusive and include only purchases after or at the message timestamp.
user_id, user_name, and first_qualifying_purchase_at.user_id ascending.| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique user identifier |
| user_name | VARCHAR(100) | User display name |
| VARCHAR(255) | User email address |
| Column | Type | Description |
|---|---|---|
| message_idPK | INT | Unique message record identifier |
| user_id | INT | Recipient user identifier |
| campaign_code | VARCHAR(50) | Promotional campaign identifier |
| sent_at | TIMESTAMP | Timestamp when the text was sent |
| message_type | VARCHAR(30) | Message classification |
| Column | Type | Description |
|---|---|---|
| purchase_idPK | INT | Unique purchase identifier |
| user_id | INT | Purchasing user identifier |
| purchased_at | TIMESTAMP | Timestamp when the purchase occurred |
| amount | DECIMAL(10,2) | Purchase amount |