I think you just want conditional aggregation:
select date,
sum(case when servicename = 'Major Service' then servicequantity else 0 end) as major_service,
sum(case when servicename = 'Minor Service' then servicequantity else 0 end) as minor_service,
sum(case when servicename = 'Tyre Service' then servicequantity else 0 end) as tyre_service,
sum(case when servicename = 'Oil Change' then servicequantity else 0 end) as oil_change
from t
group by date;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…