title: SQLite - check if any field has a 1 on each column
body: <p>I have the following query:</p>
  
  <pre><code>SELECT c.danhoEstetico, c.danhoDirecto
  FROM conceptos c
  INNER JOIN materialesconceptos mc ON mc.idConcepto = c.idConcepto
  INNER JOIN materiales m ON m.idMaterial = mc.idMaterial
  WHERE m.idMaterial IN (4,11,11)
  </code></pre>
  
  <p>Which yields the following result (for example):</p>
  
  <pre><code>danhoEstetico | danhoDirecto
  1             | 0
  1             | 0
  0             | 0
  0             | 0
  </code></pre>
  
  <p>I need to make a query that gives me if any of the items in each column has a 1, like an OR among all the fields in the same column, with an output like:</p>
  
  <pre><code>danhoEstetico | danhoDirecto
  1             | 0
  </code></pre>
  
  <p>I have tried: </p>
  
  <pre><code>SELECT
  SUM(CASE c.danhoEstetico WHEN c.danhoEstetico=1 THEN 1 ELSE 0 END) AS de,
  SUM(CASE c.danhoDirecto WHEN c.danhoDirecto=1 THEN 1 ELSE 0 END) AS dd
  FROM conceptos c INNER JOIN materialesconceptos mc ON mc.idConcepto = c.idConcepto
  INNER JOIN materiales m ON m.idMaterial = mc.idMaterial
  WHERE m.idMaterial IN (4,11,11)
  </code></pre>
  
  <p>Which, for some reason, yields:</p>
  
  <pre><code>danhoEstetico | danhoDirecto
  4             | 4
  </code></pre>
  
  <p>Any hint on this?</p>