I have never encountered the COALESCE function in SQL, so I feel the need to take note of it, COALESCE(value, ...) returns the first non-NULL value in the argument list.

http://www.postgresql.org/docs/9.1/static/functions-conditional.html
http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#function_coalesce