title: Mysql Group by showing multiple rows
body: <p>Database structure</p>
  
  <p>Table 'Org_f_a_list'</p>
  
  <pre><code>  id    org_id    user_id    date_added
    1          1          1      2017-01-01 05:05:05
  </code></pre>
  
  <p>Table 'Users'</p>
  
  <pre><code>  id      username      last_login
     1      Testuser     2017-01-01 05:05:05
  </code></pre>
  
  <p>Table 'Users_pa'</p>
  
  <pre><code>  id      user_id        summoner_id       rank_solo
     1            1                  1               15
     2            1                  2               17
  </code></pre>
  
  <p>My current query</p>
  
  <pre><code>select max(rank_solo) as rank,last_login,username,o.user_id,date_added 
        from org_f_a_list o
        join users u on o.user_id = u.id 
        join users_pa as p on u.id = p.user_id
        where org_id = :org 
        group by u.id,rank_solo,date_added
        order by rank desc
  </code></pre>
  
  <p>What I want the result to be</p>
  
  <pre><code> user_id      user_name     rank    date_added    last_login
         1      Testuser       17           date          date
  </code></pre>
  
  <p>My current result</p>
  
  <pre><code>   user_id     user_name    rank      date_added    last_login
           1     Testuser       15            date          date
           1     Testuser       17            date          date
  </code></pre>
  
  <p>For some reason the group by u.id is not doing anything and I still pull both rows and not just the max rank</p>
  
  <p>Edit : That fixed it. Thanks guys! </p>