title: LEAD function syntax in HIVE-QL
body: <p>Is there any way to convert below LEAD function into HIVE QL format??</p>
  
  <pre><code>NVL(LEAD(START_DT) OVER (PARTITION BY EV_ID,AR_EV_RLTNSHP_TYPE_CD ORDER BY START_DT)-1,'2099-12-31') AS DERIVED_END_DT
  </code></pre>
  
  <p><strong>PFB the error:</strong></p>
  
  <blockquote>
    <p>FAILED: ParseException line 1:1599 missing ) at 'OVER' near '(' in
    subquery source line 1:1603 missing FROM at '(' near '(' in subquery
    source line 1:1604 cannot recognize input near 'PARTITION' 'BY'
    'EV_ID' in subquery source</p>
  </blockquote>