0

What I would like to get is the average ScoreOverall of all the products within the List. I've tried adding some relationships but I can't get an aggregate "endpoint" on a nested level.

The data model:

List
|--ListProducts (linking table, one list to many products)
   |--ProductScore (joined view)
      |--ScoreWeighted (value I want the average across all products in this List)

Any clues on what the best approach for this would be?

user1048175
  • 1,100
  • 3
  • 12
  • 29

1 Answers1

0

If the built in GQL operations exposed by Hasura don't allow you to get everything you need your best bet is extending the schema with a custom SQL function or view

Jesse Carter
  • 20,062
  • 7
  • 64
  • 101