これを行う方法を示す優れたテクニックがあります
SELECT monthdate AS first_day_of_month,
DATE_ADD(monthdate,
INTERVAL( ( 10 - DAYOFWEEK(monthdate) ) % 7 ) + 7 DAY) AS second_saturday_of_month
FROM monthdates
これを行う方法を示す優れたテクニックがあります
SELECT monthdate AS first_day_of_month,
DATE_ADD(monthdate,
INTERVAL( ( 10 - DAYOFWEEK(monthdate) ) % 7 ) + 7 DAY) AS second_saturday_of_month
FROM monthdates