salix/print/templates/reports/driver-route/sql/routes.sql

16 lines
419 B
MySQL
Raw Normal View History

2020-09-25 12:45:00 +00:00
SELECT
r.id,
r.m3,
r.created,
r.time,
u.nickName userNickName,
v.tradeMark vehicleTradeMark,
v.model vehicleModel,
v.numberPlate plateNumber,
am.name agencyName
FROM route r
LEFT JOIN vehicle v ON v.id = r.vehicleFk
LEFT JOIN worker w ON w.id = r.workerFk
LEFT JOIN account.user u ON u.id = w.userFk
LEFT JOIN agencyMode am ON am.id = r.agencyModeFk
2021-04-27 08:29:09 +00:00
WHERE r.id IN(?)