Sum spesific column and show other column on mysql : <p>I have a table like below, how to "sum" <strong>qty</strong> column and "group by" <strong>productId</strong> with show other column? im still newbie on mysql</p>

<pre><code>id     |  productId  | invoice  | qty  | price  
-------------------------------------------------
1      |  1          | INV-01   | 2    | 1000    
2      |  2          | INV-01   | 3    | 2000             
3      |  1          | INV-01   | 1    | 1000          
4      |  2          | INV-01   | 1    | 2000         
5      |  3          | INV-02   | 1    | 3000             
6      |  3          | INV-02   | 2    | 3000             
7      |  4          | INV-02   | 2    | 4000  
</code></pre>

<p>My Expectation:</p>

<pre><code>productId  | invoice  | qty  | price  
-------------------------------------------------
1          | INV-01   | 3    | 1000    
2          | INV-01   | 4    | 2000                            
3          | INV-02   | 3    | 3000                        
4          | INV-02   | 2    | 4000  
</code></pre>
