I'm not doing it for you but I can point you in the right direction.

Research sum() and group by, try your best and if needed post your doubts.