Sign in
apache
/
drill-test-framework
/
9a5d7ecf7f32f0e95c0ea874e75d785fdee9e51d
/
.
/
framework
/
resources
/
Functional
/
timestamp_functions
/
timestampadd_diff_month.sql
blob: aeff2300a8b9449c74c9ae6fe54319c75cf21cc9 [
file
] [
log
] [
blame
]
SELECT
TIMESTAMPDIFF
(
SQL_TSI_MONTH
,
CAST
(
TIMESTAMPADD
(
SQL_TSI_MONTH
,
-15
,
o_orderdate
)
AS
DATE
),
o_orderdate
)
AS
num_of_months
FROM
orders
WHERE
o_orderkey
=
1
;