On Meta Marketplace, the analytics team wants to identify users whose second completed transaction happened within 24 hours of their first completed transaction.
Write a SQL query to return the users who meet this condition.
status = 'completed'.transaction_time.user_id, first_transaction_time, second_transaction_time, and the time difference as hours_between.user_id.transaction_time values by transaction_id ascending.hours_between to two decimal places.user_id ascending.| Column | Type | Description |
|---|---|---|
| transaction_idPK | INT | Unique transaction identifier |
| user_id | INT | Meta user identifier |
| transaction_time | TIMESTAMP | Timestamp when the transaction occurred |
| amount | DECIMAL(10,2) | Transaction amount |
| status | VARCHAR(20) | Transaction status such as completed, failed, pending, or refunded |
| payment_method | VARCHAR(30) | Payment method used for the transaction |