Syntax for using aggregate functions 

For numeric functions, you can use the following sample syntax:

SELECT 
ROUND(AVG(col1),1) AS rounded_average,
MAX(col1) AS maximum,
MIN(g_all) AS minimum,
FORMAT(COUNT(col1), 0) AS count_formatted,
SUM(col1) AS sum
FROM tablename;

For statistical functions, you can use the following sample syntax:

SELECT 
STDDEV(col1) AS 'standard_deviation',
VARIANCE(col1) AS 'variance'
FROM tablename;
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.17.91