Which of the following ranking functions distribute the rows in an ordered partition into a specified number of groups
Which of the following ranking functions distribute the rows in an ordered partition into a specified number of groups? |
A. ROW_NUMBER |
B. RANK |
C. DENSE_RANK |
D. NTILE |
E. None of the Above Ans :- D Explanation:- The NTILE ranking function distributes the rows in an ordered partition into a specified number of groups. The groups are numbered, starting at one. For each row, NTILE returns the number of the group to which the row belongs. The ROW_NUMBER ranking function returns the sequential number of a row within a partition of a result set, starting at 1 for the first row in each partition. The RANK ranking function returns the rank of each row within the partition of a result set. The rank of a row is one plus the number of ranks that come before the row in question. Just like the DENSE_RANK, in the RANK ranking function, if two or more rows tie for a rank, each tied rows receive the same rank. Unlike the DENSE_RANK, the RANK ranking function does not always return consecutive integers. The DENSE_RANK ranking function returns the rank of rows within the partition of a result set, without any gaps in the ranking. The rank of a row is one plus the number of distinct ranks that come before the row in question. If two or more rows tie for a rank in the same partition, each tied rows receive the same rank. |
Comments
Post a Comment