Sql Max and Sql Min are two of the Sql functions that are used to get the extreme values.
Max is used to get the highest value while Min is to get the lowest value. The argument used in the function can be a column name, a function or combination of columns.
Unlike the functions SUM, AVG and COUNT, the DISTINCT clause does not affect the MIN and MAX result.
Example: Let's use the menu from my favorite noodle restaurant. They have this sub menu for Noodle. The task is to show the cheapest and the most expensive price.
|2.1||Singapore Fried Noodle||9.00|
|2.2||Beef Fried Soy Noodle||8.50|
|2.4||Salted Fish Fried Noodle||9.50|
|2.5||Fried Koay Teow||10.50|
You can use Max and Min on a char field, it will compare the values alphabetically.
Briefly, the usage is similar to Max and Min function. It calculates the average value of a numeric field.
The Avg function will ignore the Null value when it calculates the average. The Distinct has impact to the result.
The core of Sql, selecting data from table.
Conditionally selecting rows from table.
Eliminating duplicate values in the output.
Counting number of rows.
Getting the sum of a field
Sql Order By
Sorting the output
Sql And Or
Connecting two or more conditions in the Where or Having clause.
Sql Group By
Grouping rows into sets.
To filter the result of aggregation
Pattern searching for conditions in Where or Having clause
Added to conditions to show results between two values.
Return from Sql Max to Sql Commands
All of us have at least two or three things that excite us. We could talk about these subjects for hours. Good news!. Did you know that Site Built It! can turn this type of deep interest and enthusiasm into a revenue-generating business?
Review some of the Site Build It! case studies and you'll absolutely discover something that ignites more positive ideas into your mind.
SBI! Video Tour
Invest the most
Buy at AllPosters.com
Sydney Harbor Bridge, Sydney, Australia