MySQL 每周都有活动,但每个月只有第一周?

MySQL event weekly but only first week every month?

我需要 运行 每周(每个月的第一个星期五)和除本月第一个星期五之外的每个星期五的另一个活动。我能想到的就是

IF WEEKDAY()=4 AND DAYOFMONTH() BETWEEN 1 AND 7 THEN ....

IF WEEKDAY()=4 AND DAYOFMONTH() BETWEEN 8 AND 31 THEN ....

但是有没有 better/more 简洁的查询?

SET @x := '2018-06-01';

SELECT CASE WHEN WEEKDAY(@x) = 4 
            THEN CASE WHEN DAYOFMONTH(@x) < 8 
                      THEN 'FIRST FRIDAY' 
                      ELSE 'SOME OTHER FRIDAY' END 
            ELSE 'NOT FRIDAY' END x;
+--------------+
| x            |
+--------------+
| FIRST FRIDAY |
+--------------+




SET @x := '2018-06-08';

SELECT CASE WHEN WEEKDAY(@x) = 4 
            THEN CASE WHEN DAYOFMONTH(@x) < 8 
                      THEN 'FIRST FRIDAY' 
                      ELSE 'SOME OTHER FRIDAY' END 
            ELSE 'NOT FRIDAY' END x;
+-------------------+
| x                 |
+-------------------+
| SOME OTHER FRIDAY |
+-------------------+

SET @x := '2018-06-07';

SELECT CASE WHEN WEEKDAY(@x) = 4 
            THEN CASE WHEN DAYOFMONTH(@x) < 8 
                 THEN 'FIRST FRIDAY' 
                 ELSE 'SOME OTHER FRIDAY' END 
            ELSE 'NOT FRIDAY' END x;
+------------+
| x          |
+------------+
| NOT FRIDAY |
+------------+