Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implements built-in window functions #1228

Merged
merged 2 commits into from Feb 23, 2024

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
2 checks passed
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.

None yet

2 participants