Right now I have made two tables to store user data and all transactions what users made. Structure of transaction table looks like this:
id user symbol price quantity total name type
---------- ---------- ---------- ---------- ---------- ---------- -------------------------- ----------------
1 user1 A 55.43 2 110.86 Agilent Technologies, Inc. buy
1 user1 A 53.25 3 159.75 Agilent Technologies, Inc. buy
With query SELECT * WHERE user = 'user1'
i can select all transactions user1 made, but how can I combine these two rows in one and quantities sums up? Is this even possible in SQL?