salix/print/templates/reports/zone/sql/zone.sql

9 lines
207 B
SQL

SELECT
r.id,
r.time,
am.name agencyName,
v.numberPlate plateNumber
FROM route r
JOIN agencyMode am ON am.id = r.agencyModeFk
JOIN vehicle v ON v.id = r.vehicleFk
WHERE r.id = :routeId