Select p.Pump_Name, sum(hd.delivery_volume) as volume, sum(hd.delivery_value) as value
from hose_delivery hd , hoses h , pumps p
where hd.hose_id = h.hose_id and h.pump_id = p.pump_id and
CONVERT(VARCHAR(10),hd.Cleared_Date_Time,103) = CONVERT(VARCHAR(10),GETDATE(),103)
group by p.Pump_Name order by p.Pump_Name
No comments:
Post a Comment