doris版本:1.2.4-1
sql语句:
截图:
select
b1.created_time
,b1.road
,ROUND(AVG(b1.estimate_km),4) as '平均运距'
,ROUND(AVG(b1.rate), 4) as ton_km_price
from(
select
b.created time
,concat(p.end_plate_province, p.end_plate_city) as road
,p.estimate_km
,if(b.valu_mode='1',Round(b.price / p.estimate_km, 4), Round(b.price /b.truck_loading_weight/ p.estimate_km, 4)) as rate
FROM dataease.bu_delivery b
LEFT JOIN dataease.bu_publish p on b.publish_id = p.publish_id
WHERE
(concat(p.end_plate_province, p.end_plate_city) like '%郑州%'
OR concat(p.end_plate_province, p.end_plate_city) like '%武汉%'
OR concat(p.end_plate_province, p.end_plate_city) like '%泰安%'
OR concat(p.end_plate_province, p.end_plate_city) like '%渭南%'
OR concat(p.end_plate_province, p.end_plate_city) like '%西安%')
and b.val_status ='90'
and b.created_time >='2023-01-01'
and b.created_time < '2025-01-01'
order by b.created_time
limit 100)b1
group by
b1.created_time
,b1.road
order by
b1.created_time
注释:
end_plate_province : 目的地省
end_plate_city :目的地市
be.out异常栈信息:
是否复现:可复现