title: How do I backfill missing mysql data from one table?
body: <p>I have a MySQL table called employee that looks like this:</p>
  
  <pre><code>ID | User    | Phone_No     | Phone_No_Count
  1  | Fred    | 9999         | 1
  2  | John    | 8888         | 2
  3  | Pablo   | 123          | 1
  4  | John    |              | 0
  5  | John    | 8888         | 2
  6  | Pablo   |              | 0
  7  | John    | 456          | 1
  </code></pre>
  
  <p>Phone_No_Count is a count of the Phone_No column, if there is no Phone_No then Phone_No_Count is set to zero.</p>
  
  <p>I want to backfill the missing Phone_No entries using Phone_No entries which have the highest Phone_No_Count.</p>
  
  <p>e.g. User John has 2 Phone_No's (8888 and 456) so I just want to use 8888 as it has the highest Phone_No_Count (2)</p>
  
  <p>The backfilled data in employee would then look like this:</p>
  
  <pre><code>ID | User    | Phone_No     | Phone_No_Count
  1  | Fred    | 9999         | 1
  2  | John    | 8888         | 2
  3  | Pablo   | 123          | 1
  4  | John    | 8888         | 0
  5  | John    | 8888         | 2
  6  | Pablo   | 123          | 0
  7  | John    | 456          | 1
  </code></pre>
  
  <p>I can then update the Phone_No_Count separately, which I know how to do anyway.</p>
  
  <p>All the examples I've seen online are for backfilling multiple tables or if it's just one table they don't have the required logic for this. </p>
  
  <p>Can somebody please help as this has been frying my brain all day!!</p>