calculates avg data for all users saved in database