I have a table like below i want the latest entry to be displayed.Please let me know i you need any other details :  [The Query which iam using now is below ][1]


[The raw output s as this image shows][2]


The data is what i get now but  i want the latest entry for uid 3,15,33

The reason why i have done the below is 
and ua.user_activity_uid=(select max(ua0.user_activity_uid) from user_activity ua0)

ksl_user_activity table has a primary key user_activity_id which has the meximum value for the latest entry but iam not getting any data when i include this in my Query 

i also tried 
and ua.user_activity_uid=(select ua0.user_activity_uid from user_activity ua0 order by ua0.user_activity_uid desc limit 1)

which is also not working .Please help me out


  [1]: https://i.stack.imgur.com/hzFTn.png
  [2]: https://i.stack.imgur.com/I2L5t.png