title: SQL check if all values of bool are true by group
body: <p>I just new to sql and recently face an issue...</p>
  
  <p>When in the order all the items are <code>IsRepInbound = True</code> then all the line items of this order will be <code>R</code>.
  If in the order there is at least 1 item <code>IsRepInbound = False</code> then all the line items of this order will be <code>E</code>. </p>
  
  <p>Tried Group By, but it seems i do not need aggregation... maybe OVER clause to Partition By?  Any hint? </p>
  
  <p><strong>Table A</strong>   </p>
  
  <pre><code>"Item_Number"   "Order Number"  "IsRepInbound"
  1                   OR-1            TRUE  
  2                   OR-1            TRUE  
  3                   OR-1            FALSE  
  4                   OR-1            TRUE  
  1                   OR-2            TRUE  
  2                   OR-2            TRUE  
  3                   OR-2            TRUE  
  </code></pre>
  
  <p><strong>Table B (try to reach):</strong>  </p>
  
  <pre><code>"Item_Number"   "Order Number"  "Exchage_Ind"
  1                   OR-1            E  
  2                   OR-1            E  
  3                   OR-1            E  
  4                   OR-1            E  
  1                   OR-2            R  
  2                   OR-2            R  
  3                   OR-2            R  
  </code></pre>