title: How to select boolean column based on the other column value in SQL?
body: <p>I have a table, "relation", which store the relation between Rate and Deal.
  It looks like:</p>
  
  <pre><code>DealId              RateId       IsPremium 
  ------------------------------------------------
      1                 A           True 
      2                 A           False           
      3                 B           False
      4                 B           True
      5                 B           True
      6                 C           False
      7                 C           False
  </code></pre>
  
  <p>DealId is unique, and one RateId can map to many different DealId.</p>
  
  <p>Now, Buesiness team asked me to provide a report about this table, but <strong>IsPremium</strong> value will be changed to <strong><em>True</em></strong> if the same RateId in this table already has <strong><em>True</em></strong> value.   </p>
  
  <p>That means, based on the request, my new report will be:</p>
  
  <pre><code>DealId              RateId       IsPremium 
  ------------------------------------------------
      1                 A           True 
      2                 A           True           
      3                 B           True
      4                 B           True
      5                 B           True
      6                 C           False
      7                 C           False
  </code></pre>
  
  <p>Since RateId C doesn't have <strong>True</strong> value in the original table, I will keep showing it with False value.</p>
  
  <p>I tried to use "Group BY RateId" in my SQL script, but can't deal with the value in IsPremium... </p>