Database & utility
window
first_value()
The first value of expr in the frame. Can IGNORE or RESPECT NULLS.
Reference: DuckDB 2.0.0
Arguments & returns
first_value(expr)
window
| Overload link | expr |
Returns |
|---|---|---|
| #01 | ANY |
ANY |
Example
1 more ↓Haybarn WASM 2.0.0-rc12 · In your browser
Engine example with sample data · Run to view results.
More examples
Haybarn WASM 2.0.0-rc12 · In your browser
Guide example · Run to view results.
In other engines
Apache Hivefirst_value()
SELECT FIRST_VALUE(sample_col, TRUE)
SELECT FIRST_VALUE(sample_col IGNORE NULLS)
Apache Spark
SELECT ANY_VALUE(col, true), FIRST(col, true), FIRST_VALUE(col, true) OVER ()
SELECT ANY_VALUE(col), ANY_VALUE(col), FIRST_VALUE(col IGNORE NULLS) OVER ()