How to group by a column with null values <p>I have a table like this:</p> <pre><code>C1 | C2 -----|---- 23 | 10 null | 10 23 | 10 24 | 10 24 | 10 </code></pre> <p>I want group by C1 and calculate null's C2 value in both 23 and 24's sum(C2)</p> <pre><code>SELECT C1, sum(C2) FROM table GROUP BY C1 </code></pre> <p>query return this table:</p> <pre><code>C1 | C2 -----|---- 23 | 20 null | 10 24 | 20 </code></pre> <p>but I want this:</p> <pre><code>C1 | C2 -----|---- 23 | 30 24 | 30 </code></pre> <p>is it possible to get a result like that?</p>