title: How do I get SUM function in MySQL to return '0' if no values are found?
body: <p>Say I have a simple function in MySQL:</p>
  
  <pre><code>SELECT SUM(Column_1)
  FROM Table
  WHERE Column_2 = 'Test'
  </code></pre>
  
  <p>If no entries in <code>Column_</code>2 contain the text 'Test' then this function returns <code>NULL</code>, while I would like it to return 0. </p>
  
  <p>I'm aware that a similar question has been asked a few times here, but I haven't been able to adapt the answers to my purposes, so I'd be grateful for some help to get this sorted.</p>