Tutorials Hut

  • SQL Testing




  • SQL Aggregate Functions

    SQL Aggregate Functions are used when information like sum of column values, Count of column values , Average etc are required

    • Aggregate functions are used in place of column names in the SELECT statement.
    SQL aggregate Functions
    Aggregate Function

    Description

    AVG

    Average of all the values in the specified column

    COUNT 

    Number of selected rows

    MAX 

    Highest value in the expression

    MIN 

    The smallest value in the specified column.

    SUM 

    Total of the values in the numeric expression

     Example

     List the maximum Account Balance in the Employees Account

    SELECT MAX (AccountBalance) FROM EmployeeAccount;

     

    List the average account balance in the Employees Account

     

    SELECT AVG (AccountBalance) FROM EmployeeAccount

     

    LIST SUM of  all account balance in the EmployeeAccount

     SELECT SUM (AccountBalance) FROM EmployeeAccount

     




  • SQL Testing


















  • Leave a Reply

    Your email address will not be published. Required fields are marked *