Before we can calculate retention we need to get our data formatted in a way where we can determine if a user returned.
gameplays table is a list of when the user played, and it's not easy to see if any user came back.
By using a
self-join, we can make multiple gameplays available on the same row of results. This will enable us to calculate retention.
The power of
self-join comes from joining every row to every other row. This makes it possible to compare values from two different rows in the new result set. In our case, we'll compare rows that are one date apart from each user.