Min Function

We use the MIN () function to determine the smallest amount or number in a column. While there may be more than one row with the smallest number, only one row will be returned. Select MIN (MonthsWithOwner) AS LeastTimeWithOwner FROM Cat; OUTPUT LeastTimeWithOwner...

Max Function

We use the MAX () function to determine the largest amount or number in a column. While there may be more than one row with the largest number, only one row will be returned. Select MAX (MonthsWithOwner) AS MostTimeWithOwner FROM Cat; OUTPUT MostTimeWithOwner...

Avg Function

We use the AVG () function to determine the average of all the values in a column. These examples use the columns MonthsWithOwner and OwnerAge Select AVG (MonthsWithOwner) AS AvgTimeWithOwner FROM Cat; OUTPUT AvgTimeWithOwner —————- 37 (1...

Sum Function

We use the SUM () function to determine the total value of all the rows in a column. This example uses MonthsWithOwner. Select SUM (MonthsWithOwner) AS 'Total Months of Cat Ownership' FROM Cat; OUTPUT MonthsWithOwner —————— 10055 (1...