SELECT SQL_CALC_FOUND_ROWS * FROM #__imgs AS a WHERE a.state = '1' AND a.type = 'progress' AND ((a.year = 2019 AND a.month = 5) OR (a.year = 2019 AND a.month = 4) OR (a.year = 2019 AND a.month = 3)) ORDER by a.year DESC, a.month DESC, a.week DESC

Фото

Апрель
Неделя 4
Неделя 3
Неделя 2
Неделя 1