At StreamForge, product analysts want to identify users who completed action A but did not complete action B within the next 24 hours. Write a PostgreSQL query to return those users.
Requirements
- Consider each
A event independently.
- A user qualifies if they have at least one
A event with no corresponding B event from the same user in the next 24 hours.
- Return each qualifying user once, along with the timestamp of the qualifying
A event.
- Sort the result by
a_timestamp ascending, then user_id ascending.