win_func_first_last.sql 331 B

12345678910
  1. /* postgres can not */
  2. SELECT
  3. key,
  4. FIRST_VALUE(cast(subkey as uint32)) RESPECT NULLS OVER w1,
  5. FIRST_VALUE(cast(subkey as uint32)) IGNORE NULLS OVER w1,
  6. LAST_VALUE(cast(subkey as uint32)) OVER w1,
  7. LAST_VALUE(cast(subkey as uint32)) IGNORE NULLS OVER w1,
  8. subkey
  9. FROM plato.Input
  10. WINDOW w1 as (ORDER BY key desc, subkey);