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

TJDB: As a user, I should be able to run aggregate functions with group by for TJDB queries #9988

Open
3 tasks done
akshaysasidrn opened this issue Jun 5, 2024 · 0 comments · Fixed by #10122 · May be fixed by #10170
Open
3 tasks done

TJDB: As a user, I should be able to run aggregate functions with group by for TJDB queries #9988

akshaysasidrn opened this issue Jun 5, 2024 · 0 comments · Fixed by #10122 · May be fixed by #10170

Comments

@akshaysasidrn
Copy link
Collaborator

akshaysasidrn commented Jun 5, 2024

PRD: link
ADR: link

Problem:
Currently, there is no means to aggregate results in the query itself. User need to transform it separately to get the desired results.

Solution
In the existing - list rows and join tables operation - Aggregate will be shown as standalone operation just like sort and limit. In the first iteration, we will pick up only - Sum, and Count.
In one query user will be able to add multiple aggregate conditions, corresponding to different columns.

Limitations

  1. Sum can only be used for integer, big int and float data type
  2. Min and Max can be used for integer, big int, float and timestamp data types
  3. Count will count all the values present in selected column except NULL

Subtasks:

  • Add preliminary configuration setup for PostgREST
  • Update TJDB query manager for aggregate & group by in list query
  • Update for aggregate & group by in join query
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants