Sign in
apache
/
drill-test-framework
/
9a5d7ecf7f32f0e95c0ea874e75d785fdee9e51d
/
.
/
framework
/
resources
/
Functional
/
timestamp_functions
/
timestampadd_diff_minute_hour.sql
blob: 9e25393c6e06c1b773cdc8c5ff2b2991539af81c [
file
] [
log
] [
blame
]
SELECT
TIMESTAMPDIFF
(
SQL_TSI_HOUR
,
CAST
(
TIMESTAMPADD
(
SQL_TSI_MINUTE
,
-600
,
CAST
(
o_orderdate
AS
TIMESTAMP
))
AS
TIMESTAMP
),
CAST
(
o_orderdate
AS
TIMESTAMP
))
AS
num_of_hours
FROM
orders
WHERE
o_orderkey
=
3
;