answersLogoWhite

0


Best Answer

Aggregate FunctionsMINreturns the smallest value in a given columnMAXreturns the largest value in a given columnSUMreturns the sum of the numeric values in a given columnAVGreturns the average value of a given columnCOUNTreturns the total number of values in a given columnCOUNT(*)returns the number of rows in a table

Aggregate functions are used to compute against a "returned column of numeric data" from your SELECT statement. They basically summarize the results of a particular column of selected data. We are covering these here since they are required by the next topic, "GROUP BY". Although they are required for the "GROUP BY" clause, these functions can be used without the "GROUP BY" clause. For example:

SELECT AVG(salary)

FROM employee;

This statement will return a single result which contains the average value of everything returned in the salary column from the employee table.

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

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are aggregate function in sql explain any 5 aggregate function with example?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Identify and explain any 4 functions of groupware?

explain any 4 function of groupware?


Give an example of a relation that is NOT a function and explain why it is not a function?

y² = x --> y = ±√x Because there are *two* square roots for any positive number (positive and negative) this will not be a function.


Explain the allocation of memory cells when a function is called?

When you call a function, the stack pointer is adjusted to cater for the function's arguments (if any), the caller's return address (mandatory), the function's local variables (if any) and the function's exception handlers (if any).


Where is f(x) discontinuous but not differentiable Explain?

Wherever a function is differentiable, it must also be continuous. The opposite is not true, however. For example, the absolute value function, f(x) =|x|, is not differentiable at x=0 even though it is continuous everywhere.


Is there any example of the custom or practice Can you show me the picture and explain it?

yep


How will you define management as a function in an organization?

Hi guys. Could any one help me out with this question: management is a function of science or technology: explain


Are there any websites that explain how to do an oven repair?

Yes, there are websites that explain how to do an oven repair. One of these is called HowStuffWorks.com, for example.


What is density of 5mm aggregate?

The density of 5mm aggregate typically ranges from 1,500 to 1,800 kg/m3. This may vary depending on the specific composition of the aggregate and any air gaps present.


What does 5 million each occurrence and in the aggregate mean?

The Aggregate coverage is the maximum the policy will pay out in any given policy term. .


What is an example of a simple borel measurable function?

One example of a simple Borel measurable function is the indicator function of a Borel set. This function takes the value 1 on the set and 0 outside the set, making it easy to determine its measurability with respect to the Borel sigma algebra.


Why all variables are declared with in the function?

It is not necessary to to declare variables inside the function in C. If you declare a variable inside a function, the variable becomes local for the function and another variable of same name can be declared in any other function, but you can not use the variable declared in other function. When you declare any variable outside the function body then the variable becomes global and can be used in any function of the program. Note: errno is an example for a variable declared outside any function.


What is a real-life example of composition of functions?

Think of the function associated with a voice recording you made say with Audicity or any other recording software. That is a function f. Applying any effect is a composition of function. If for example one amplified his/her recording, then a composition is done. That is we used Aof i,e A(f).