title: Is there a way in SQL to create a new column that looks at the values in a column that shares multiple rows to determine the value in the new column?
body: <p>My data looks similar to what I've attached.</p>
  <p>I'm wanting to create a new column that looks at the appt# and any row associated with that appt to see if that appt had the procedure D0330 and marks it yes or no.</p>
  <p>So for example B Bradley's appt 8210 did include the procedure D0330. So the new column would be marked yes for both lines 1 &amp; 2 despite line 2 not having that specific procedure in it's row.</p>
  <p>What would be the best way to go about doing this?</p>
  <p><a href="https://i.stack.imgur.com/AOSaV.png" rel="nofollow noreferrer">Data</a></p>