Sign in
apache
/
drill-test-framework
/
HEAD
/
.
/
framework
/
resources
/
Functional
/
window_functions
/
aggregates
/
aggOWnFn_4.q
blob: 7a75f8a8200d119ef3be061152a1d794fa419dd1 [
file
] [
log
] [
blame
]
SELECT
*
FROM
(
SELECT c1
,
c2
,
lag
(
c2
)
OVER
(
PARTITION BY c2 ORDER BY c1
)
lag_c2
,
NTILE
(
3
)
OVER
(
PARTITION BY c2 ORDER BY c1
)
tile FROM
`tblWnulls.parquet`
)
sub_query WHERE lag_c2
=
'e'
ORDER BY tile
,
c1
;