Mysql
 sql >> Database >  >> RDS >> Mysql

Ottieni l'ultimo record di ogni mese in MySQL....?

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