title: What is the practical use of FIRST_VALUE and LAST_VALUE of SQL Server 2012 (Code name: Denali) CTP 3
body: <p>With Denali's CTP 3 release , we have more analytical functions out of which I am interested in two:</p>
  
  <p>a) <a href="http://msdn.microsoft.com/en-us/library/hh213018%28v=SQL.110%29.aspx" rel="nofollow">First_Value</a><br>
  b) <a href="http://msdn.microsoft.com/en-us/library/hh231517%28v=SQL.110%29.aspx" rel="nofollow">Last_Value</a></p>
  
  <p>I understood that <code>FIRST_VALUE</code> returns first value based on partition and order by clause while <code>Last_Value</code> returns last value based on partition and order by clause.</p>
  
  <p>But in what practical situation they will be useful? A sample real time situation will help me understand this.</p>