Skip to content

Add aggregation and Sql Functions Support #55

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

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

nealarec
Copy link

@nealarec nealarec commented Apr 4, 2024

Aggregation and Sql Functions Support

Now you can use aggregations and some SQL functions like sum, avg, month or year in this way
ave:year:column_name, you can also count on the group by query count:distinct:name

Return aggregations:

{
  "returns": ["year:date", "month:date", "sum:value"],
  "group_by": ["year_date", "month_date"]
}

Will perform SELECT year(date) as year_date, month(date) as month_date, sum(value) FROM ... GROUP BY year_date, month_date

You can also nest functions as your convenience like:

{
  "returns": ["min:year:date"]
}

Will perform SELECT min(year(date)) as min_year_date FROM ...

You can read more on SQLFunctions and DatabaseFunctions

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.

1 participant