title: Adding on a column with different where clauses using a subquery
body: <p>I've got a query that pulls data from the current year, and I'm trying to add on data in a new column from the previous year using a subquery since the main query's WHERE statement limits it to the current year. I keep getting a an error that the subquery returns more than 1 value, but when I run just the subquery, it's only one value per ID.  I previously was running these 2 queries separately and using vlookup in Excel to join the final column, but I'd love a way to do this in one query.</p>
  
  <pre><code>SELECT DISTINCT student_master.id_num,  stud_term_sum_div_a.trm_gpa,  
         (SELECT stud_term_sum_div_b.trm_gpa  
          FROM student_master LEFT OUTER JOIN
               stud_term_sum_div stud_term_sum_div_b
               ON student_master.id_num = stud_term_sum_div_b.id_num 
          WHERE ( stud_term_sum_div_b.yr_cde = '2018'
         ) A AS Prev_GPA
  FROM student_master LEFT OUTER JOIN
       stud_term_sum_div stud_term_sum_div_a
       ON student_master.id_num = stud_term_sum_div_a.id_num
  WHERE stud_term_sum_div_a..yr_cde = '2019' 
  </code></pre>
  
  <p>I expect there to be 3 columns - student ID, 2019 gpa, 2018 gpa</p>