updated sql for users per month analysis