content_image/694260.jpg content_image/694270.jpg
<img src='content_image/694260.jpg'>

• DENSE_RANK() over_clause 

Returns the rank of the current row within its partition, without gaps. Peers are considered ties and receive the same rank. This function assigns consecutive ranks to peer groups; the result is that groups of size greater than one do not produce noncontiguous rank numbers. For an example, see the RANK() function description. 

This function should be used with ORDER BY  to sort partition rows into the desired order. Without ORDER BY , all rows are peers. 

over_clause  is as described in Section 12.21.2, “Window Function Concepts and Syntax” . 

• FIRST_VALUE( expr )  [ null_treatment ] over_clause 

Returns the value of expr  from the first row of the window frame. 

over_clause  is as described in Section 12.21.2, “Window Function Concepts and Syntax” . null_treatment  is as described in the section introduction. 

The following query demonstrates FIRST_VALUE() , LAST_VALUE() , and two instances of NTH_VALUE() : 

<img src='content_image/694270.jpg'>

