What are aggregate functions in SQL?

Posted On: Dec 17, 2020

 

A function is a unit of code that is used for the reusability of a program. An SQL aggregate function calculates on a set of values and returns a single value. The function should return a value. Some SQL aggregate functions are as follows:

  • AVG() - It returns the average of a set.
  • COUNT() - It returns the number of items in a set.
  • MAX() - It returns the maximum value in a set.
  • MIN() - It returns the minimum value in a set.
  • SUM() - It returns the sum of all or distinct values in a set.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    HCL freshers interview questions

    What is an array?

    In programming, Array is a collection of similar types of values in a single unit. Array stores data in a contiguous memory location....

    HCL freshers interview questions

    Explain ISO/OSI Model and it's Layers?

    The OSI model is a networking model for understanding and designing a network architecture that would be flexible, robust, and interoperable. Communication between different systems without requiring ...

    HCL freshers interview questions

    What are four pillars of OOPS?

    The four pillars of OOPs are as follows:Inheritance Abstraction Encapsulation Polymorphism ...