title: How to combine sql statements from 2 tables
body: <p>I have two sql statements that work:</p>
  
  <pre><code>select firstName from table1 s INNER JOIN  table2 t ON s.LoginId = t.userId
  </code></pre>
  
  <p>and </p>
  
  <pre><code>select testScore from table2 where userId in (select loginId from table1)
  </code></pre>
  
  <p>How can I combine the statements so </p>
  
  <pre><code>firstName
  </code></pre>
  
  <p>from the first statement is added to the output of the second statement (i.e. the output produces firstName and testScore?</p>