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

OVER() support #9

Open
valeeum opened this issue Feb 27, 2020 · 0 comments
Open

OVER() support #9

valeeum opened this issue Feb 27, 2020 · 0 comments

Comments

@valeeum
Copy link

valeeum commented Feb 27, 2020

Thanks again for this great library!

I'm currently using the following for simple counts over the entire aggregated set.

.FIELD(xql.RAW('count(*) OVER() AS full_count'))

But for more complicated use cases, would be nice not to do this using the RAW method. Here is an example:

  .FIELD(
    COUNT(
      CASE().WHEN(
        AND(...thisPeriodCriteria),
        COL(`sometable.id`),
      ),
    )
      .DISTINCT()
      .OVER()   <-  would be nice if support for this would be added
      .AS('full_count'),
  )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants