title: Pivot table null differentiation problems
body: <p>I have a table of tests of different types, like this</p>
  
  <pre><code>id  lab# testType           result
  72  700  Aerobic Plate Count NEG
  73  701  Aerobic Plate Count NULL
  74  701  E. Coliform         &lt;10
  75  701  Total Coliform      20
  76  701  Yeast/Mold          NULL
  77  702  Aerobic Plate Count NULL
  78  702  E. Coliform         NULL
  </code></pre>
  
  <p>I have used this code</p>
  
  <pre><code>SELECT
      lab_number,
      MAX(IF(test_type='Aerobic Plate Count',result,NULL)) AS apc,
      MAX(IF(test_type='Total Coliform',result,NULL)) AS tc,
      MAX(IF(test_type='E. Coliform',result,NULL)) AS ec,
      MAX(IF(test_type='Yeat/Mold',result,NULL)) AS ym,
      MAX(IF(test_type='Salmonella VIDAS',result,NULL)) AS sv,
      MAX(IF(test_type='p.H.',result,NULL)) AS ph,
      MAX(IF(test_type='Solids',result,NULL)) AS sl
  FROM
      test
  group by
      lab_number;
  </code></pre>
  
  <p>to generate a pivot table so that I can easily display all the results and allow them to be edited. Not every test is represented with every type, so a lot of values are NULL. However, results that havent been added in yet are also NULL, <strong>is there a way to differentiate between NULL result and a NULL because of no entry?</strong> I could make the default value for result be something other than NULL, but I'd rather not do that if there is another way.</p>