Я бы сделал условную агрегацию вместо:
select col,
sum(case when team = 'Production' then qty else 0 end) as production_qty,
sum(case when team = 'wastage' then qty else 0 end) as wastage_qty,
sum(case when team = 'staff' then qty else 0 end) as staff_qty
from issued
group by col --- use actual column name if any