a guest Mar 23rd, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- SELECT gg.ts AS time, fv.license_plate AS mobil, SUM(gg.totaldistance) AS mileage, (SUM(gg.totaldistance)/fr.distance) AS ritase
- FROM fleet_vehicle fv
- LEFT JOIN gpswox_device gd ON gd.id = fv.gpswox_id
- LEFT JOIN gpswox_gps gg ON gg.name = gd.id
- LEFT JOIN fleet_route fr ON fr.id = fv.route_id
- WHERE gg.ts = '2019-03-22 11:48:56'
- GROUP BY gg.ts, fv.license_plate, fr.distance
- LIMIT 10
RAW Paste Data