You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can submit aggregation queries via _connection queries_. The following aggregation functions are supported:
747
-
748
-
-`count`: Counts the number of records in a list
749
-
-`avg` (_coming soon_): Computes the average of a list of numbers.
750
-
-`median` (_coming soon_): Computes the median of a list of numbers.
751
-
-`max` (_coming soon_): Returns the greatest element of a list of numbers.
752
-
-`min` (_coming soon_): Returns the smallest element of a list of numbers.
753
-
-`sum` (_coming soon_): Computes the sum of a list of numbers.
754
-
755
-
> See [this](https://github.com/prisma/prisma/issues/1312) GitHub issue to learn more about the upcoming aggregation functions.
756
-
757
-
### Examples
758
-
759
-
_Count the number of post records_:
760
-
761
-
<Codelanguages={["Go", "Result"]}>
762
-
763
-
```ts
764
-
const postCount:number=awaitprisma
765
-
.postsConnection()
766
-
.aggregate()
767
-
.count()
768
-
```
769
-
770
-
```js
771
-
9
772
-
```
773
-
774
-
</Code>
746
+
Aggregrations are currently not supported in the Prisma Go client. You can track the progress of this feature in [this](https://github.com/prisma/prisma/issues/4027) GitHub issue.
0 commit comments