select table1.*
from table1
join table2 on table1.date between table2.date_from and table2.date_to
;
WHERE DATE_FORMAT(column_1, '%Y-%m') = '2020-10';
foreach($stack as $value){
$value = explode(',', $value);
$xflist .= "<div class=" . $value[0] . ">" . $value[1] . "</div>";
}