How to insert a row in MySQL that dynamically uses other values in the table that match a SELECT query? Suppose you have a table: