Subscribe For Free Updates!

We'll not spam mate! We promise.

SQL MIN/MAX Statements

SQL MIN/MAX Statements
Finding the minimum or maximum value in a set of data can also be extremely useful.
This can be achieved with the MIN/MAX commands as follows:-
 
SELECT MAX (Balance)
FROM SecA_Bal
WHERE AGENT=Dowling:
 
This query will tell us which the highest balance any customer owes agent Dowling is 553.50.
The aggregate functions can be combined, and used in conjunction with each other and with other commands.
For example:
 
SELECT SUM (Balance), AVG (Balance)
FROM SecA_Bal;
 
The aggregate functions are essential to SQL as they greatly increase the scope of the language in terms of data manipulation, and it’s capability in terms of serving different users needs.
 
Aggregate functions are typically used in summarizing data and generating repots, and thus add value to data for management and other users not directly working with the database.

Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Powered By: BloggerYard.Com