select distinct month(t.fecha_inicio) as month, year(t.fecha_inicio) as year, date_format(t.fecha_inicio,'%Y%m') as id from curso_tienda as t where estado=1 and estore = 1;