Atenção
Erro ao acessar o banco de dados
ERROR: syntax error at or near "extract" LINE 1: ...ct count(*) from sgrh.mag_evento where ( between extract('y... ^
select count(*) from sgrh.mag_evento where ( between extract('year' from data_ini) and extract('year' from data_fim))