title: How do I select a row with two columns joined by one column from another table?
body: <p>I'm sorry if my question doesn't make sense. I'm not sure how to word it. I just started self-studying SQL and there's something I want to do but I'm not sure how to do it. I'm hoping someone could help me out.</p>
  <p>I have two tables where Table 1 is a list of students and Table 2 is a list of lab partners. Table 2 has students listed with their id numbers instead of names. The two tables can be joined together by student_id = student1_id (or student2_id).</p>
  <p>Table 1</p>
  <pre><code>| student_id | student_name |
  |------------|--------------|
  | 01         | Alex         |
  | 02         | Ben          |
  | 03         | Chris        |
  | 04         | Dave         |
    
  </code></pre>
  <p>Table 2</p>
  <pre><code>| group_number | student1_id | student2_id |
  |--------------|-------------|-------------|
  | 1            | 01          | 02          |
  | 2            | 03          | 04          |
  </code></pre>
  <p>What would my select query look like if I wanted lab partners to show as names instead of id numbers? (See desired result below.)</p>
  <p>Query result:</p>
  <pre><code>| group_number | (student_name of student1_id) | (student_name of student2_id) |
  |--------------|-------------------------------|-------------------------------|
  | 1            | Alex                          | Ben                           |
  | 2            | Chris                         | Dave                          |
  </code></pre>
  <p>I'm actually stumped. I'm hoping someone could send me in the right direction. I would greatly appreciate the help!</p>