Breaking News

Important Aggregate SQL Functions for interview

 Aggregate SQL Functions

Last minute  notes....

1. COUNT: Counts the number of rows in a result set.


2. SUM: Calculates the sum of values in a numeric column.


3. AVG: Calculates the average value of a numeric column.


4.MIN: Finds the minimum value in a column.


5. MAX: Finds the maximum value in a column.


6. FIRST: Returns the first value in a set.


7.LAST: Returns the last value in a set.


8. LEAD: Returns the value of a column for a subsequent row within the result set.


9. LAG: Returns the value of a column for a preceding row within the result set.


10. STDEV: Calculates the standard deviation of a set of values.


11. VAR: Calculates the variance of a set of values.


12. CUME DIST: Calculates the cumulative distribution of a value within a set of values.


13. CORR: Calculates the correlation coefficient between two sets of values.


14. RANK: Assigns a rank to each row based on the values in one or more columns.


15. PERCENT_RANK: Calculates the relative rank of a value within a set.


16. COVAR_POP: Calculates the population covariance between two columns.


17. COVAR_SAMP: Calculates the sample covariance between two columns.


18.GROUP_CONCAT: Concatenates values from multiple rows into a single string.


19. PERCENTILE_CONT: Calculates the value at a specified percentile.


20. PERCENTILE_DISC: Calculates the discrete percentile value.

No comments