SELECT
  a.id,
  a.titulo,
  a.resumo,
  a.publicar_site,
  a.pdf_path,
  a.created_at AS ata_cadastrada_em,
  s.id AS sessao_id,
  s.numero AS sessao_numero,
  s.tipo AS sessao_tipo,
  s.data_sessao
FROM atas a
JOIN sessoes s ON s.id = a.sessao_id
WHERE DATE(a.created_at) BETWEEN :data_ini AND :data_fim
ORDER BY a.created_at DESC, a.id DESC