title: How to select last entry per ID in SQL
body: <p>I have a big log table with 2 million rows give or take.</p>
  
  <p>I am looking to look for the last entry for each id.</p>
  
  <p>The 3 columns of importance are</p>
  
  <ul>
  <li>Userid</li>
  <li>Actiontype</li>
  <li>Actiontime</li>
  <li>Text2</li>
  </ul>
  
  <p>Some userids show up thousands of times some just show up once. I need the most recent of each userid. I tried to use 'Group By' but it wont work because text2 is different for each entry which is really the data I need. So it needs to be ordered by actiontime, actiontype needs to be 103. I am really at a loss how to do this. </p>
  
  <p>Any help would be appreciated. </p>