title: Update MySQL Query that selects records with a certain non-unique value
body: <p>I'm looking for help creating a MySQL query. I have the following database table:</p>
  
  <pre><code>+----------------+-----------+-------------+------------+-------------------+---------+-------------+---------------+--------+
  | option_type_id | option_id | sku         | sort_order | customoptions_qty | default | in_group_id | dependent_ids | weight |
  +----------------+-----------+-------------+------------+-------------------+---------+-------------+---------------+--------+
  |            552 |       137 | 13071727    |       1000 | 0                 |       0 |           0 |               | 0.0000 |
  |            553 |       137 | 13071727B   |       1000 | 0                 |       0 |           1 |               | 0.0000 |
  |            554 |       137 | 13071727C   |       1000 | 1                 |       0 |           2 |               | 0.0000 |
  |            555 |       137 | 13071727D   |       1000 | 1                 |       0 |           3 |               | 0.0000 |
  |            556 |       138 | 13085350-1  |       1000 | 0                 |       0 |           0 |               | 0.0000 |
  |            557 |       138 | 13085350-1D |       1000 | 2                 |       0 |           1 |               | 0.0000 |
  |            558 |       138 | 13085350-1C |       1000 | 3                 |       0 |           2 |               | 0.0000 |
  |            559 |       138 | 13085350-1B |       1000 | 2                 |       0 |           3 |               | 0.0000 |
  |            560 |       139 | 13069547M   |       1000 | 20                |       0 |           0 |               | 0.0000 |
  |            561 |       140 | 13084477-2  |        950 | 2                 |       0 |           0 |               | 0.0000 |
  |            562 |       140 | 13084477-2B |        951 | 2                 |       0 |           1 |               | 0.0000 |
  |            563 |       140 | 13084477-2C |        952 | 3                 |       0 |           2 |               | 0.0000 |
  |            564 |       140 | 13084477-2D |        953 | 0                 |       0 |           3 |               | 0.0000 |
  |            565 |       140 | 13084477-2E |        954 | 2                 |       0 |           4 |               | 0.0000 |
  |            566 |       141 | 13066533-1  |       1000 | 4                 |       0 |           0 |               | 0.0000 |
  |            567 |       141 | 13066533-1B |       1000 | 5                 |       0 |           1 |               | 0.0000 |
  |            568 |       141 | 13066533-1C |       1000 | 5                 |       0 |           2 |               | 0.0000 |
  |            569 |       141 | 13066533-1D |       1000 | 0                 |       0 |           3 |               | 0.0000 |
  |            570 |       142 | 13071674    |       1000 | 0                 |       0 |           0 |               | 0.0000 |
  |            571 |       142 | 13071674D   |       1000 | 1                 |       0 |           1 |               | 0.0000 |
  |            572 |       142 | 13071674C   |       1000 | 2                 |       0 |           2 |               | 0.0000 |
  |            573 |       142 | 13071674B   |       1000 | 0                 |       0 |           3 |               | 0.0000 |
  |            574 |       142 | 13071674E   |       1000 | 4                 |       0 |           4 |               | 0.0000 |
  |            575 |       143 | 13071667    |       1000 | 0                 |       0 |           0 |               | 0.0000 |
  |            576 |       143 | 13071667B   |       1000 | 0                 |       0 |           1 |               | 0.0000 |
  |            577 |       143 | 13071667C   |       1000 | 0                 |       0 |           2 |               | 0.0000 |
  |            578 |       143 | 13071667D   |       1000 | 0                 |       0 |           3 |               | 0.0000 |
  |            579 |       143 | 13071667E   |       1000 | 0                 |       0 |           4 |               | 0.0000 |
  |            580 |       144 | 13066295    |       1000 | 1                 |       0 |           0 |               | 0.0000 |
  +----------------+-----------+-------------+------------+-------------------+---------+-------------+---------------+--------+
  </code></pre>
  
  <p>What I'd like to do is <strong>update</strong> all the rows where <code>in_group_id</code> = 0, to add an <code>A</code> to the end of the <code>sku</code>. However I'd only like to do this on rows that <strong>do not</strong> have a unique <code>option_id</code> value.</p>
  
  <p>For example, you can see that the row with <code>option_id</code> = 139 is the <strong>only</strong> row with this <code>option_id</code> value, so I'd like to <strong>exclude</strong> this row from being updated.</p>
  
  <p>Basically this is a list of product options, some products have multiple options each with it's own SKU. However for these products that have multiple options there is an 'A' missing from the end of the 1st option's SKU, and I'd like to add it. But I don't wish to add an 'A' to products that only have 1 option. I hope this makes sense.</p>
  
  <p>If someone could advise on the MySQL statement that could achieve this, that would be great!</p>