Skip to content

Conversation

geoffmacd
Copy link
Contributor

Adds window functions to Sqlite.swift, see https://www.sqlite.org/windowfunctions.html#built_in_window_functions. The OVER cause was problematic in the current structure of the code, so for now, only OVER (ORDER BY {expression}) is supported but that is most of the use cases. The ORDER BY used here is not the same as the func order() in QueryType and cannot used like this.

  • row_number()
  • rank()
  • dense_rank()
  • percent_rank()
  • cume_dist()
  • ntile(N)
  • lag(expr, offset, default)
  • lead(expr, offset, default)
  • first_value(expr)
  • last_value(expr)
  • nth_value(expr, N)

@nathanfallet nathanfallet merged commit f4ce124 into stephencelis:master Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants