title: TIMESTAMPDIFF not working if one of the cells is NULL in Python3 MySQL
body: <p>I have a table with the following four DATETIME columns and the last fifth column INTEGER: time_in1, time_out1, time_in2, time_out2, total_seconds.</p>
  
  <p>The function for the "total_seconds" column is </p>
  
  <pre><code>((TIMESTAMPDIFF(SECOND,time_in1,time_out1))+(TIMESTAMPDIFF(SECOND,time_in2, time_out2)))
  </code></pre>
  
  <p>Is there a way to make the "total_seconds" show the total even if only "time_in1" and "time_out1" are filled with the right data but the other two columns are NULL?</p>
  
  <p>I know that I could create more columns to separately calculate total seconds for each interval and then SUM all of them in the total column. But it would be nice to make it work like above.</p>