/* postgres can not */
/* syntax version 1 */
SELECT
  key,

  FIRST_VALUE(key) RESPECT NULLS OVER w1,
  FIRST_VALUE(key) IGNORE NULLS OVER w1,
  LAST_VALUE(key) OVER w1,
  LAST_VALUE(key) IGNORE NULLS OVER w1,

  FIRST_VALUE(null) RESPECT NULLS OVER w1,
  FIRST_VALUE(null) IGNORE NULLS OVER w1,
  LAST_VALUE(null) OVER w1,
  LAST_VALUE(null) IGNORE NULLS OVER w1,

  subkey
FROM plato.Input
WINDOW w1 as (ORDER BY subkey ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)
ORDER BY subkey;
