Atenção
Erro ao acessar o banco de dados
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ASC' at line 1
SELECT DATE_FORMAT(MIN(DATE(DT_PRODUCAO)),'%m/%Y') as competencia, ROUND(SUM(VL_PROCEDIMENTO_P),2) as total_prod_audit_pg from tb_consolidacao_despesa where CD_PLANO = 50 AND FL_TIPO_AUTORIZACAO <> 'R' AND DT_PRODUCAO BETWEEN CURDATE() - INTERVAL 7 MONTH AND CURDATE() group by DT_PRODUCAO ASC