sql to show only users latest actions

Doesn't order properly