Problem statement -
There is a table, named app_strt , with two columns -
user_id (integer) - This column has ids of users of an android application. Each user has a unique id. Example - 121
timestamp (datetime field) - This is the timestamp when the application is launched by a user. Example - 21/07/2020 16:11:11
Whenever any user launches the application, a new row is added to the table. In the new row, user id will be assigned based on who launched the application and timestamp will be the date and time when the app was launched by that user.
What percent of total users use the application on their day 2? Day 2 here means a day after a user installs the application. For example if you installed the application on 8th September then 8th September is considered day 1 for you. 9th September is considered day 2 for you. So each user will have his own day 1, day 2 and so on, based on what date he installed the application. Need to write query for calculating - What percent of total users use the application on their day 2?