So ideally I'd like a table output such as:
consecutive_days | max_date
for a given user
where consecutive days is the number of days a person logged something and max_date was the last date in that series.
I have a table which is
id | user_id | value | created_at | updated_at
and I can't figure out how to do this at all. I know I need to select all the dates for a given user and then order by that date. I'm thinking I'd then want to group them by the consecutive series but that's where my limited knowledge of mysql flies straight out the window.
Here is an actual screen shot of the table. ignore plan_id.
The created_at column is when an entry was added so the consecutive days would be based on the date n that column.