title: Record count for day and next day from table
body: <p>I am trying to find the count of records for day + 1 using below hive query. Getting error because We have hive 0.10 version.</p>
  
  <pre><code>select 
  lead(count(*)) over (order by day),
  day 
  from device_fact_kpis 
  where day=20160301 group 
  by day;
  </code></pre>
  
  <blockquote>
    <p>FAILED: ParseException line 1:27 missing FROM at '(' near '(' in
    subquery source line 1:28 cannot recognize input near 'order' 'by'
    'day' in subquery source</p>
  </blockquote>
  
  <p>Is there a way to find count for next day without using lead function as hive 0.10 does not have lead function.</p>