query fix
This commit is contained in:
@ -78,6 +78,7 @@ class ReportsController extends Controller
|
|||||||
-- assign a trip_id by cumulative sum of trip_start
|
-- assign a trip_id by cumulative sum of trip_start
|
||||||
SUM(trip_start) OVER (PARTITION BY vhc_id ORDER BY crt_s) AS trip_id
|
SUM(trip_start) OVER (PARTITION BY vhc_id ORDER BY crt_s) AS trip_id
|
||||||
FROM trips
|
FROM trips
|
||||||
|
where ignition = 4
|
||||||
),
|
),
|
||||||
agg AS (
|
agg AS (
|
||||||
SELECT
|
SELECT
|
||||||
|
|||||||
Reference in New Issue
Block a user