SELECT
  a.id, a.titulo, a.resumo, a.publicar_site, a.created_at,
  s.numero AS sessao_numero, s.tipo, s.data_sessao
FROM atas a
JOIN sessoes s ON s.id = a.sessao_id
WHERE (a.pdf_path IS NULL OR a.pdf_path = '')
ORDER BY a.created_at DESC