title: MYSQL Select Query with SUM()
body: <p>I have the following table:</p>
  
  <pre><code>| campaign_id | source_id | clicked | viewed |
  ----------------------------------------------
  | abc         | xxx       | 0       | 0      |  
  | abc         | xxx       | 1       | 0      |
  | abc         | xxx       | 1       | 1      | 
  | abc         | yyy       | 0       | 0      |    
  | abc         | yyy       | 1       | 0      |    
  | abc         | yyy       | 1       | 1      |    
  | abc         | yyy       | 0       | 0      |
  </code></pre>
  
  <p>I need the following output:</p>
  
  <pre><code>xxx &gt; Total: 3 // Clicked: 2 // Viewed 1
  yyy &gt; Total: 4 // Clicked: 2 // Viewed 1
  </code></pre>
  
  <p>I know that I have to use some sort of SUM() in my query, but I don't know how to differ between those multiple unique values in the source_id (something like foreach, idk).  </p>
  
  <p>How can I get such an output which shows stats from all unique source_ids by using only one query?</p>