What approach should I take to visualize next-day user retention?

Hello everyone,
I’m new to Elastic, and I’d like to ask a question.

In Analytics -> Dashboard, when creating a visualization panel, how can I view the next-day user retention rate?Assume I have the following data:

`userid 100, date 2024-11-27, event register  `
`userid 101, date 2024-11-28, event register  `
`userid 102, date 2024-11-28, event register  `
`userid 103, date 2024-11-28, event register  `
`userid 104, date 2024-11-28, event register  `
`userid 100, date 2024-11-29, event active  `
`userid 101, date 2024-11-29, event active  `

The user retention rate for the 28th is 25% because the same userid must register on the first day and be active on the next day to count as retained.

Should I use Elasticsearch Aggregations?
Based on my current understanding, It seems impossible to ensure that the userid in the 11-29 active events matches the userid in the 11-28 register events when performing calculations in Elasticsearch Aggregations. it may also be possible that I missed something.

What approach should I take to visualize next-day user retention?