Last active
August 18, 2020 16:07
-
-
Save dylanirlbeck/e2cf211ebb5c3e50fa1e7a5d49f52e31 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT ((COALESCE(outbound_deliveries.departure_time, CURRENT_TIMESTAMP) - inbound_deliveries.arrival_time) / 3600) AS turnaround_time | |
FROM inbound_deliveries | |
INNER JOIN outbound_deliveries ON outbound_deliveries.inbound_delivery_id = inbound_deliveries.id | |
GROUP BY inbound_deliveries.id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment