Hi is there a way that I can do the SUM(total_points) based on a different condition to the rest of the SELECT statement, so I want the SUM(total_points) for every row which is
SELECT ... SUM(CASE WHEN track_id <= [your_value] THEN total_points ELSE 0 END ) AS total_points, ....