Affected rows

Closes #921