SELECT LATEST ENTRY ON GROUP BY This query doesn't return the "latest" entry, rather it returns the "older" rows:

 SELECT MAX(ID), ID, NEW_BALANCE, DATE, NAME, ACC_NO 
 FROM 
 (
  SELECT ID, NEW_BALANCE, DATE, NAME, ACC_NO 
  FROM account_logs 
  WHERE customer_id = 1061 
  ORDER BY DATE DESC, ID DESC 
) AS sub 
GROUP BY YEAR(date), MONTH(date) ORDER BY DATE ASC ;


The following inner query:

SELECT ID, NEW_BALANCE, DATE, NAME, ACC_NO 
FROM account_logs 
WHERE customer_id = 1061 
ORDER BY DATE DESC, ID DESC 


...perfectly arranges the rows by the latest entries:

 

I would like to GROUP BY the latest entries, rather I get this: 



The rows I need:
SELECT *
FROM account_logs 
WHERE ID IN (
  SELECT MAX(ID)
  FROM account_logs 
  WHERE customer_id = 1061 
  GROUP BY DATE )
ORDER BY DATE ASC ;


The sub-query should return all the ID's that you are interested in.