title: Hive: COUNT features requires GROUP BY when using HAVING, work around?
body: <p>I'm curious if there is a workaround for excluding a field in the 'group by' statement in Hive? </p>
  
  <pre><code>select g.country, count(*) as road_count
  from geography g 
  join g_street gs on (g.id=gs.id)
  group by g.iso_country_code, g.virtual
  having (g.virtual='f' or g.virtual is null)
  ;
  </code></pre>
  
  <p>I do not want the 'g.virtual' in the group by statement because my result should be grouped by country only. Hive requires the 'g.virtual' in the group by statement. </p>
  
  <p>Thanks in advance!</p>