I have an events table with 3 columns:
- sequence_id (the "offer" shown to many different cart sessions)
- checkout_token (the cart session for a single visitor)
- action (the type of event generated by the user with that cart session token)
I want to output data in the following (NOT real numbers according to my image, just dummy example of output format):
sequence_id action_0_unique_count action_1_unique_count
1 5 4
2 2 0
im trying to count the DISTINCT number of event types (action enum column) PER checkout session, grouped by sequence_id
Here's an image example of which rows I'm trying to select for column 2. Column 3 would be similar, except WHERE action = 1
