title: SQL/HIVE - Distinct count query - How does SELECT COUNT (DISTINCT columns,..) differ from SELECT COUNT(*) with subquery of DISTINCT records
body: <p>In HIVE, I tried getting the count of distinct rows in 2 methods,</p>
  
  <ol>
  <li><p><code>SELECT COUNT (*) FROM (SELECT DISTINCT columns FROM table);</code></p></li>
  <li><p><code>SELECT COUNT (DISTINCT columns) FROM table;</code></p></li>
  </ol>
  
  <p>Both are yielding <strong>DIFFERENT RESULTS</strong>. 
  The count for the first query is greater than the second query.
  How are they working differently?
  Thanks in advance.</p>