Driver_Day Fact Table

Column

Description

Example

driver_dimension

Maps directly to the Driver dimension table using the driver_[COLUMN NAME] naming convention. For example driver_last_name to query the last_name column of the Driver dimension table.

SELECT 

 "distance" AS "distance",

 "driver_last_name" AS "last name"

FROM 

 "driver_day" 

WHERE 

 "driver_last_name" is not null AND

 "distance" is not null

GROUP BY 

 "distance", "driver_last_name"

ORDER BY 

 "distance" DESC

LIMIT

 20;

start_day_dimension

Maps directly to the Date dimension table using the start_day_[COLUMN NAME] naming convention. For example start_day_name_of_week to query the name_of_week column of the Date dimension table.

SELECT 

 "driver_name" AS "driver name",

 "distance" AS "distance",

 "start_day_date" AS "Date"

FROM 

 "driver_day" 

WHERE 

 "driver_name" is not null AND

 "distance" is not null AND

 "start_day_is_weekday" = true

GROUP BY 

 "driver_name", "distance", "start_day_date"

ORDER BY 

 "start_day_date" DESC

LIMIT

 20;

distance

Total distance traveled by this driver, across vehicles, in the user's default distance units (miles or kilometers).

29012

total_idle

The duration spent in a vehicle status of idling by this driver, in seconds.

615

hard_accel

The number of hard acceleration events recorded during this trip.

3

hard_brake

The number of hard acceleration events recorded during this trip.

6

seatbelt_violations

The number of seatbelt violations recorded for this driver.

2

speeding_over_posted

The number of speeding over posted violation events recorded for this driver.

1

speeding_excessive

The number of excessive speeding events recorded for this driver.

2

engine_time

The total engine running time recorded for this driver, in seconds.

3600

fuel_used

The amount of fuel used by this driver, in the user's default volume units (gallons or liters).

103

total_non_productive_idle

The total time spent in a non-productive idle status by this driver, in seconds.

95

best_distance

 

 

best_duration

 

 

dtc_count

The number of diagnostic trouble codes logged during the trip.

0

idle_over_ten_minutes

The number of 'idling over ten minutes' events triggered.

3