• The subquery in the update confused me. I would use a "case when else" statement instead. It is longer, but for me better readable.