SELECT SQL_CALC_FOUND_ROWS events.* FROM events inner join events_meta on (events.id = events_meta.event_id) WHERE occupations LIKE "%Tutte Le Professioni%" AND ended_at > current_date() AND events.type LIKE "%fsc%" AND credit > 30 AND credit <= 40 AND (events_meta.key = 'provider' and value LIKE '%"id":"4238"%') GROUP BY events.id ORDER BY events.updated_at DESC, events.agenas_id ASC LIMIT 0, 25