Mysql
 sql >> Base de Dados >  >> RDS >> Mysql

Obter último registro de cada mês no MySQL....?

SELECT * FROM table 
WHERE created_on in 
(select DISTINCT max(created_on) from table 
GROUP BY YEAR(created_on), MONTH(created_on))