title: Multiple table joins in rails
body: <p>How do I write the mysql query below into rails activerecord </p>
  
  <pre><code>select
      A.*,
      B.* 
  from
      raga_contest_applicants_songs AS A 
      join
          raga_contest_applicants AS B 
          ON B.contest_applicant_id = A.contest_applicant_id 
      join
          raga_contest_rounds AS C 
          ON C.contest_cat_id = B.contest_cat_id 
  WHERE
      C.contest_cat_id = contest_cat_id 
  GROUP BY
      C.contest_cat_id    
  </code></pre>
  
  <p>I know how to write joins on two tables; however, I'm not very confident on how to use join on 3 tables. </p>