Different query if category_id is 0 (total)