Removed unused sum queries from stats controller