title: SQLite select average from one table and update average field from another table using trigger
body: <p>I have some problems with creating a trigger that will update values in a second table with average values from the first table. Since i am not very familiar with sqlite statements, maybe you guys can help me. </p>
  
  <p>Here is my problem : i have one table table_1 </p>
  
  <p><img src="https://i.stack.imgur.com/jDZ5H.png" alt="table 1 description"></p>
  
  <p>and another table table_2 </p>
  
  <p><img src="https://i.stack.imgur.com/IXTJE.png" alt="enter image description here"></p>
  
  <p>What i want is that table_2 "average_value" field to be updated with the average of values from table_1 that have the same field. </p>
  
  <p>In this particular case resulting the aveage_value field in table 2 like this : 
  5 - for field_a
  8 - for field_b
  0 - for field_c</p>
  
  <p>Any suggestions will help me alot ! Thank You. </p>