question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for common aggregate functions(and distinct)

See original GitHub issue

Feature request

There are a bunch of commonly used Postgres methods that should be added:

  • COUNT(*)
  • AVG(number)
  • MIN(number)
  • MAX(number)

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:14
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
dshukertjrcommented, Feb 23, 2021

Forgot to mention it here, but COUNT is now an option when making request!

https://github.com/supabase/postgrest-js/pull/147

2reactions
jdgamble555commented, Sep 26, 2022

Group By is provided by postgres. Could we add this feature?

It should be relatively simple.

This is also very important because you can’t subscribe to Views or Procedures. There is no work around for that.

J

Read more comments on GitHub >

github_iconTop Results From Across the Web

Aggregating Distinct Values with DISTINCT - Peachpit
This sample chapter introduces SQL's aggregate functions, or set functions, which operate on a group of values to produce a single, ...
Read more >
SQL Aggregate Functions | Intermediate SQL - Mode Analytics
This SQL tutorial covers how to aggregate data across entire columns using the COUNT, SUM, MIN, MAX, and AVG functions. SQL aggregate functions...
Read more >
Aggregate Functions - Rockset
All single argument functions support a DISTINCT option, as in COUNT(DISTINCT x) , where all the duplicate values are removed from the input...
Read more >
SQL Aggregate Functions: SUM(), COUNT(), AVG(), Functions
An aggregate function in SQL performs a calculation on multiple values and returns a single value. SQL provides many aggregate functions ...
Read more >
Learn SQL: Aggregate Functions - SQLShack
APPROX_COUNT_DISTINCT ; CHECKSUM_AGG; COUNT_BIG; GROUPING; GROUPING_ID; STDEV; STDEVP; STRING_AGG; VAR; VARPB. While all aggregate functions ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found