title: mysql how to get 2nd highest value with group by and in a left join
body: <pre><code>(select id from owner where date_format(auction_date,'%Y-%m-%d %H:%i:00') = date_format(NOW(),'%Y-%m-%d %H:%i:00')) as a
      left join (select owner_id,max(nb) as maxbid from auction group by owner_id) as b on a.id=b.owner_id
      left join (select owner_id,max(mb) as maxautobid from auction group by owner_id) as c on a.id=c.owner_id
  </code></pre>
  
  <p>For the second left join statement, i'm able to get the highest mb value. Can someone help me add a third left join statement so that i can get the second highest mb value??</p>