The SQL MAX aggregate function allows us to select the highest (maximum) value for a certain column.
The SQL MAX function syntax is very simple and it looks like this:
SELECT MAX(Column1)
FROM Table1
If we use the Customers table from our previous chapters, we can select the highest date of birth with the following SQL MAX expression:
SELECT MAX(DOB) AS MaxDOB
FROM Customers
Popular Posts
-
SQL Replication term describes a group of technologies allowing information distribution and mirroring between different databases. SQL repl...
-
package interfaceexercise; // Define an interface with three abstract methods. // Any class that implements this interface has to // impleme...
-
The SQL GROUP BY statement is used along with the SQL aggregate functions like SUM to provide means of grouping the result dataset by certai...
-
The SQL SELECT statement is used to select data from a SQL database table. This is usually the very first SQL command every SQL newbie learn...
-
The SQL MAX aggregate function allows us to select the highest (maximum) value for a certain column. The SQL MAX function syntax is very sim...
-
The SQL JOIN clause is used whenever we have to select data from 2 or more tables. To be able to use SQL JOIN clause to extract data from 2 ...
-
The foundation of every Relational Database Management System is a database object called table. Every database consists of one or more tabl...
-
The SQL AND clause is used when you want to specify more than one condition in your SQL WHERE clause, and at the same time you want all con...
-
Lab exercises and homeworks: * Things to check before you start the lab * Chapter 3 (Class #1, Jan. 16th homework) o Exerc...
-
The SQL COUNT aggregate function is used to count the number of rows in a database table. The SQL COUNT syntax is simple and looks like this...
No comments:
Post a Comment