Combined SQL statements to a single upsert.