title: count NULL for all columns in hive
body: <p>I have a hive table with 300 columns (mixed datatype), I want to check what percentage of records have NULL values in all the columns. Can it be done simply. </p>
  
  <pre><code>col: 1     2     3     4     ...... 300
       A     4     null  78    ...... 300 columns
       B     null  70    90    ...... 300 columns
       c     4     null  78    ...... 300 columns
       g     null  72    90    ...... 300 columns
       t     4     98    null  ...... 300 columns
       null  null  70    90    ...... 300 columns
       A     4     null  78    ...... 300 columns
       B     null  70    90    ...... 300 columns
  </code></pre>
  
  <p>Result should be:</p>
  
  <pre><code>col 1: 12.5% (1/8 is null)
  col 2: 50%
  col 3: 37.5
  col 4: 12.5%
  .
  .
  col 300: x%
  </code></pre>
  
  <p>Thanks a lot</p>