SQL Aggregate Functions
SQL Aggregate functions return a single value, using values in a table column. Below is a list of SQL aggregate functions and how to use them. AVG() Function The AVG() function returns the average value of a numeric column.
1SELECT AVG(column_name) FROM table_name
COUNT() Function This allows us to COUNT up the number of row in a certain table.
1SELECT COUNT(column_name) FROM table_name
COUNT and DISTINCT can be used together in a statement to fetch the number of distinct entries in a table. FIRST() Function The returns the first value of the selected column.
1SELECT FIRST(column_name) FROM table_name
LAST() Function The returns the last value of the selected column.
1SELECT LAST(column_name) FROM table_name
MAX() Function The returns the largest value of the selected column.
1SELECT LAST(column_name) FROM table_name
MIN() Function The returns the smallest value of the selected column.
1SELECT MIN(column_name) FROM table_name
SUM() Function The SUM function is used to calculate the total for a column.
1SELECT SUM(column_name) FROM table_name
TweetBacks

There are no comments for this entry.
[Add Comment] [Subscribe to Comments]