MySQL MICROSECOND Function

Example

Return the microsecond part of a datetime:

SELECT MICROSECOND("2017-06-20 09:34:00.000023");

Definition and Usage

The MICROSECOND() function returns the microsecond part of a time/datetime (from 0 to 999999). Continue reading MySQL MICROSECOND Function

MySQL MIN Function

Example

Find the price of the cheapest product in the “Products” table:

SELECT MIN(Price) AS SmallestPrice FROM Products;

Definition and Usage

The MIN() function returns the minimum value in a set of values.

Note: See also the MAX() function. Continue reading MySQL MIN Function

MySQL AVG Function

Example

Return the average value for the “Price” column in the “Products” table:

SELECT AVG(Price) AS AveragePrice FROM Products;

Definition and Usage

The AVG() function returns the average value of an expression.

Note: NULL values are ignored. Continue reading MySQL AVG Function