grabs from 1 column
table: Networth
| NetWorthInMillions | Yob |
|--------------------|------|
| 50 | 1989 |
| 10 | 1992 |
| 30 | 1995 |
| 5 | 1899 |
SELECT MAX(NetWorthInMillions) from Networth;
| |
|----|
| 50 |max per row, across multiple columns
table: Distances
| distance_to_home | distance_to_work |
|------------------|------------------|
| 10 | 20 |
| 5 | 1 |
SELECT GREATEST(distance_to_home, distance_to_work) from Distances
| |
|----|
| 20 |
| 5 |returns FIRST non-null argument
used for analyzing stuff
returns index of the argument that is less than the first argument
SELECT NetWorthInMillions from Actors where FirstName IN(Tom, Kim);