How to use CASE statement in sql select statement to deal with if-then-else logic.
SQL functions.
SQL basics.