Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
SQL Min and Max | SQL Aggregate Functions
SQL Tutorial for Beginners
course content

Contenido del Curso

SQL Tutorial for Beginners

SQL Tutorial for Beginners

1. Database & Introduction to Syntax
2. SQL Aggregate Functions
3. Filtering Statements

bookSQL Min and Max

Aggregate Functions

There are functions in SQL that returns single line result among a group of the rows. These functions are called aggregate functions.

MIN() and MAX() functions return the minimum and maximum result from the query, and this is always a single line.

Let's find the release date of the oldest song in our table:

1
SELECT MIN(year) FROM songs
copy

Now, let's select the price of the most expensive song of 21st century:

12
SELECT MAX(price) FROM songs WHERE year > 2000
copy

Tarea

Find the price of the most expensive song.

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 2. Capítulo 1
toggle bottom row

bookSQL Min and Max

Aggregate Functions

There are functions in SQL that returns single line result among a group of the rows. These functions are called aggregate functions.

MIN() and MAX() functions return the minimum and maximum result from the query, and this is always a single line.

Let's find the release date of the oldest song in our table:

1
SELECT MIN(year) FROM songs
copy

Now, let's select the price of the most expensive song of 21st century:

12
SELECT MAX(price) FROM songs WHERE year > 2000
copy

Tarea

Find the price of the most expensive song.

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 2. Capítulo 1
toggle bottom row

bookSQL Min and Max

Aggregate Functions

There are functions in SQL that returns single line result among a group of the rows. These functions are called aggregate functions.

MIN() and MAX() functions return the minimum and maximum result from the query, and this is always a single line.

Let's find the release date of the oldest song in our table:

1
SELECT MIN(year) FROM songs
copy

Now, let's select the price of the most expensive song of 21st century:

12
SELECT MAX(price) FROM songs WHERE year > 2000
copy

Tarea

Find the price of the most expensive song.

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Aggregate Functions

There are functions in SQL that returns single line result among a group of the rows. These functions are called aggregate functions.

MIN() and MAX() functions return the minimum and maximum result from the query, and this is always a single line.

Let's find the release date of the oldest song in our table:

1
SELECT MIN(year) FROM songs
copy

Now, let's select the price of the most expensive song of 21st century:

12
SELECT MAX(price) FROM songs WHERE year > 2000
copy

Tarea

Find the price of the most expensive song.

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
Sección 2. Capítulo 1
Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
some-alt