An inner join is now necessary for this.
Bug fix: Forgot to actually increment the numerator.
Updating releaseId in case of a release merge.
Bug fix: Due to foreign key constraints, shouldn't delete the release until the end.
Need a join here now in order to compute the sum of lengths.