stats to DB