DAYOFMONTH(date)
0 から 31 の範囲内の日にちを、date に対して戻します。
0
31
date
mysql> SELECT DAYOFMONTH('1998-02-03'); -> 3
SELECT DAYOFMONTH('1998-02-03');