1. select date_format(date_sub('2023-05-07', interval d day), '%Y%m%d') as dataDate 2. from ( 3. select d from ( 4. select @r:=@r+1 as d from 5. (select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 6. 8 union select 9 union select 0) t1, 7. (select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8. 8 union select 9 union select 0) t2, 9. (select @r:=-1) t0 10. ) as m where d <= 29 11. ) t2