我要油型的总和.
where fullname = gift and
FDate = '01-10-2023' and vehicalType = 'car'
还包括油类合计
where fullname = 'gift' and
FDate = '01-10-2023' and vehicalType = 'motorcycle'
在单个查询中.
我正在写这段代码,但不是在工作.
Select vehicalType, sum(total) as total ,fullname, FDate
from paking_histories
where FDate = '01-10-2023' and oiltype ='oil' and Fullname ='gift';
需要结果.
Car motorcycle date
Total total 01-10-2023