ideal_level_source (ie. solution) calculation 

This time try taking advantage of existing indexes rather than creating a new one.

We do not have an index on `activities.level_id`, but we do have indexes on `level_source_id.level_id` and `activities.level_source_id` so if we join and count on those columns instead we should be able to avoid a full table scan of activities.