title: SQL Count empty fields
body: <p>I'm not sure if this is possible or if it is, how to do it -</p>
  
  <p>I have the following data in a database -</p>
  
  <pre><code>id     |    improve |   timeframe |  criteria |  impact
  -------+------------+-------------+-----------+--------- 
  1      |            |    Test     |   Test    |    Test
  2      |    Test    |             |   Test    |   
  3      |            |    Test     |           |    
  -------+------------+-------------+-----------+--------- 
  </code></pre>
  
  <p>Ignoring the id column, how can I determine the number of fields out of the remaining 12 that are not null using an SQL query?</p>
  
  <p>I have started with -</p>
  
  <pre><code>SELECT improve, timeframe, impact, criteria 
  FROM data 
  WHERE improve IS NOT NULL 
    AND timeframe IS NOT NULL 
    AND impact IS NOT NULL 
    AND criteria IS NOT NULL;
  </code></pre>
  
  <p>This only returns the number of rows, ie. 3.</p>
  
  <p>Any ideas?</p>
  
  <p>Thanks.</p>