title: Mysql - getting distinct records
body: <p>I have the following MySql table (user_actions) with the following columns:
  id, user_id, created_at, action_type</p>
  
  <p>I want a sql query that will get the latest actions that the user performed with no duplication of the actions.</p>
  
  <p>for example: 
  user_id 1 has 3 records that has the action_type "follow"
  and 2 records that has the action_type "unfollow"</p>
  
  <p>in this case i want the query to return two records, one with action_type "follow" and one with "unfollow"</p>
  
  <p>any thoughts?</p>