get the total spends per school in one row

a query to get the total spend of each school per topic with one row per topic