-
I tried a few obvious things but got an error every time, having the code on one long line is the only variant that worked. func last_dep_time() {
return SQL(
int,
"last_value(DEP_TIME) over(partition by FL_DATE order by DEP_TIME rows between unbounded preceding and unbounded following)"
)
}
// 10 dates at busy airports with no departures in the last 5 min of the day
air[DEP_TIME != null]{
ORIGIN,
FL_DATE,
DEP_TIME,
last_dep: last_dep_time()
}[last_dep < 2355]{
ORIGIN, FL_DATE, last_dep
=> flights: count(DEP_TIME)
} \
order{^flights}[..10] \
order{ORIGIN, FL_DATE} |
Beta Was this translation helpful? Give feedback.
Answered by
erezsh
Aug 21, 2021
Replies: 1 comment
-
Yes, you can use Examples: >> SQL(int,
"""5
* 5"""
)
25
>> SQL(int,
"5"
+ "* 5"
)
25 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
dimitri-b
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, you can use
+
on strings, or ignore newlines with"""
.Examples: