title: Get MAX value of a BIT column
body: <p>I have a SELECT request with 'inner join' in the joined table is a column with bit type.</p>
  
  <p>I want to select 1 if in the joined table is at most one value with 1. If it is not the case the value will be 0.</p>
  
  <p>So If I have:</p>
  
  <pre><code>PERSID | NAME
  1      |  Toto
  2      |  Titi
  3      |  Tata
  </code></pre>
  
  <p>And the second table</p>
  
  <pre><code>PERSID | BOOL
  1      |  0
  1      |  0
  2      |  0
  2      |  1
  </code></pre>
  
  <p>I would like to have for result </p>
  
  <pre><code>Toto -&gt; 0
  Titi -&gt; 1
  Tata -&gt; 0
  </code></pre>
  
  <p>I try this:</p>
  
  <pre><code>SELECT 
       sur.*
      ,MAX(bo.BOOL)    
  
      FROM SURNAME sur              
      INNER JOIN BOOL bo
      ON bo.IDPERS = sur.IDPERS
  </code></pre>
  
  <p>But MAX is not available on BIT column.. So how can I do that?</p>
  
  <p>Thanks,</p>