SQL min/max & Count/Avg/Sum

1.MIN (minimum value)

Syntax:

example:

2. MAX (maximumvalue)

Syntax:

Example:

3. COUNT (number of rows)

    Syntax

    Example:

    4. AVG (average value):

      Example:

      5. SUM (sum of values):

      Syntax

      Example:

      Note: In the examples above, the cars table is assumed to have a column named price.

      Leave a Comment

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

      Scroll to Top