Sign in
apache
/
drill-test-framework
/
9a5d7ecf7f32f0e95c0ea874e75d785fdee9e51d
/
.
/
framework
/
resources
/
Functional
/
timestamp_functions
/
timestampadd_diff_quarter.sql
blob: 4b3666ab7e99d9c71d11b8730a1c0a64f5170f0c [
file
] [
log
] [
blame
]
SELECT
TIMESTAMPDIFF
(
SQL_TSI_QUARTER
,
CAST
(
TIMESTAMPADD
(
SQL_TSI_QUARTER
,
-8
,
o_orderdate
)
AS
DATE
),
o_orderdate
)
AS
num_of_quarters
FROM
orders
WHERE
o_orderkey
=
1
;