|
|
-
|
|
PERCENT_RANK() function will returns the percentage value of rank of the element among its group.
PERCENT_RANK() function value will be
1. For first element in its group, it will be 0.
2. For last element in its group, it will be 1.
3. For remaining...
|
|
-
|
|
This is another function which has statistical background. This function will returns the discrete interpolated value at the specific offset
PERCENTILE_DISC() function will takes a parameter, which indicates the offset and it should be between 0 and 1...
|
|
-
|
|
This functions will return columns values from its previous rows in the same result set without the use of a self-join.
Example:
DECLARE @Users TABLE(
UserID INT IDENTITY,
UserName VARCHAR(20)
)
INSERT INTO @Users (User...
|
|
-
|
|
This is one of the functions, which has some statistical background.
**Distribution Value:**
A distribution value indicates the possibility of occurance of that value among a group of values.
For Example, when a coin is thrown, it can be head or ta...
|
|
-
|
|
This functions will return columns values from subsequent rows in the same result set without the use of a self-join.
Example:
DECLARE @Users TABLE(
UserID INT IDENTITY,
UserName VARCHAR(20)
)
INSERT INTO @Users (UserNa...
|
|
-
|
|
This is another function which has statistical background. This function will returns the continuous interpolated value at the specific offset
PERCENTILE_CONT() function will takes a parameter, which indicates the offset and it should be between 0 and...
|
|
-
|
|
`LAST_VALUE()` function returns the last value among the set of ordered values according to specified ordered & partitioned criteria. One difference between first_value and last_value is, for a group of rows, `FIRST_VALUE()` will return same value, wher...
|
|
-
|
|
`First_Value()` function returns the first value among the set of ordered values according to specified ordered & partitioned criteria.
DECLARE @Salaries TABLE
(
DepartmentId INT,
Salary INT
)
INSERT INTO @Salaries (Dep...
|
|