update query with inner join in sql