Aggregate Functions
MIN | returns the smallest value in a given column |
MAX | returns the largest value in a given column |
SUM | returns the sum of the numeric values in a given column |
AVG | returns the average value of a given column |
COUNT | returns the total number of values in a given column |
COUNT(*) | returns the number of rows in a table |
SELECT AVG(salary) FROM employee;
Another example:
SELECT AVG(salary) FROM employee; WHERE title = 'Programmer';
This statement will return the average salary for all employees whose title is equal to 'Programmer'Example:
SELECT Count(*) FROM employees;
This particular statement is slightly different from the other
aggregate functions since there isn't a column supplied to the count
function. This statement will return the number of rows in the employees
table.
If you are searching life partner. your searching end with kpmarriage.com. now kpmarriage.com offer free matrimonial website which offer free message, free chat, free view contact information. so register here : kpmarriage.com- Free matrimonial website
0 comments:
Post a Comment