Given a table of user transactions at Seatgeek, write a query to find the average time elapsed between a user's first and second ticket purchase.
Use completed ticket purchase timestamps from user_transactions. Users without at least two purchases should not contribute to the average.
average_elapsed_hours.| Column | Type | Description |
|---|---|---|
| transaction_idPK | INT | Unique identifier for the ticket purchase transaction |
| user_id | INT | SeatGeek user who made the purchase |
| purchased_at | TIMESTAMPTZ | Timestamp when the ticket purchase occurred |