title: mySQL insert column with data from one table to another
body: <p>I need to create a new table (table 2) with the data from an existing column of table 1:</p>
  
  <p><strong>Table 1:</strong></p>
  
  <p>id1 | item | type</p>
  
  <p>=============</p>
  
  <p>1 | item 1 | type B</p>
  
  <p>2 | item 2 | type A</p>
  
  <p>3 | item 3 | type A</p>
  
  <p>4 | item 4 | type B</p>
  
  <p>5 | item 5 | type C</p>
  
  <p><strong>Table 2:</strong></p>
  
  <p>id2 | type | count</p>
  
  <p>===================</p>
  
  <p>1 | type B | 2</p>
  
  <p>2 | type A | 2</p>
  
  <p>3 | type C | 1</p>
  
  <p>id1 is not the same as id2</p>
  
  <p>I've searched for answers and tried using: SET, UPDATE, INSERT JOIN with AS and FROM like some answers suggested but none of them works for me. How do I do it?</p>
  
  <p>I used these keywords for my search: mysql create table with existing column, copy column from another table, insert column from another table, update column data from another table column...</p>