I Have to calculate no of users not renewed on particular day from historical data.I have table payment containing columns : userid,product,payment_type,subscription_date,end_date where payment_type can be Annual,Quarter,Month. This table have 20000 historical data.And i have to fetch all records from starting and calculate on first subscription_date how many registered users are not renewed. and same for all subscription_date
Output Fetch all data and calculate no of registered users that does not renewed on subscription_date.