title: SQL Case in one row
body: <p>i have a problem with case, i need to see my results in one row (see attachment), thanks for any help.</p>
  <p>My code:</p>
  <pre><code>select a_number as &quot;Number&quot;,
         sum(case when code1 in ('CHOR1')   then d_left end) as &quot;Absence&quot;,
         sum(case when code2 in ('KKK') then d_left end) as &quot;KKK&quot;,
         sum(case when code2 in ('PPP') then d_left end) as &quot;PPP&quot;
  </code></pre>
  <p>THanks in advance</p>
  <p><img src="https://i.stack.imgur.com/398tA.jpg" alt="enter image description here" /></p>