limit and then group by in MySQL I have a mysql table having following structure : 

payment_id(int auto_increment), 
emp_id(int), 
chargeTime(datetime), 
payment(double)


I need to have three latest (with respect to chargeTime) records of all emp_id. What should be the query? 

Can anyone please help me? Without using cursor would be helpful.
Try:

SELECT * 
FROM yourtable
ORDER BY chargeTime DESC 
LIMIT 3