Added calculating the percentage by iterating over the results as
opposed to pushing this calculation to the database with an additional
query.