I have a database that contains information about the distance that three objects have travelled. I’m trying to write a query that displays the date and time and distance data for each object.
Object 1 moved at 5 mph for 1 minute. Object 2 moved at 1 mph for 2 minutes. Object 3 moved at 9 mph for 3 minutes. Mph stands for miles per hour.
The database backup and query results are attached. Also attached are screen shots of the database diagram and the desired results for the report.
I had to change the extension of the backup file to .txt in order to upload it to EE. Just change the extension back to .bu.
Please help me rewrite the query so that no row contains any zero values and the results are in a single row for each time period.
, Dist1 = ISNULL( b.Object_1_Speed, 0 )
, Dist2 = ISNULL( b.Object_2_Speed, 0 )
, Dist3 = ISNULL( b.Object_3_Speed, 0 )
FROM tblTimes a
JOIN tblObjects b ON a.TimeID = b.TimeID
JOIN tblDurations c ON b.DurationID = c.DurationID