Skip to main content
6 events
when toggle format what by license comment
Sep 21, 2017 at 13:34 history edited Rick James CC BY-SA 3.0
fix bug
Sep 21, 2017 at 13:34 comment added Rick James Doh! I can't count. Fixing my Answer. "7" refers to "2017-08" part of "2017-08-31...".
Sep 21, 2017 at 7:05 comment added rewb0rn I think this is partly related to the data I want, but it is ignoring users who had their last login after a given month (a user with last login in August 2015 should count as active in July 2015). Btw I think it should be LEFT(..., 7) instead of LEFT(..., 5)? However the hint for pivot table put me on the right track, I was able to alter my query with the reply in this post: stackoverflow.com/questions/7674786/mysql-pivot-table
Sep 20, 2017 at 14:40 comment added Rick James Is the data of my SELECT the data you are looking for? That is step 1. Step 2 is to "pivot" it so that rows are turned into columns.
Sep 20, 2017 at 6:37 comment added rewb0rn Thanks, but this is not quite what I am looking for. I have updated my question above to reflect better what I am looking for, sorry for the confusion. To your question: Yes, if register is June 30 and lastLogin is July 1 then this counts as a user being active one month after registration. I will also look up pivot-table and see if this might be related to my question.
Sep 19, 2017 at 16:15 history answered Rick James CC BY-SA 3.0