The SQL DATE_SUB is a mySql function, unlike SQL DATE_ADD function which add time value, SQL DATE_SUB will subtract time values (intervals) from a date value.
MySQL DATE() function is used to get the date part of a date/time expression.
SQL DATE_FORMAT() is a MySQL function which returns date/time in your requested format.
The SQL DATEDIFF() function is used to get the date/time difference of 2 date expressions. It is supported by both SQL Server and MySQL, but the syntax is different.
SQL CASE is used to provide conditional (if-else) logic in SQL statements.
SQL ADDDATE() is MySQL function used to add/subtract a time interval to a date expression.
The SQL DATEADD() function is used to add or subtract a time interval to a date.