Views: Group-By and Aggregate

Views can be used to expose the results of a custom query as a virtual table.

Sometimes we might want to fetch some data derived by aggregating (avg, min, max, etc.) over a group of rows in a table.

This view will fetch the average article rating for each author across two tables.

ERD Diagram

  • This schema is installable through your Hasura Console
  • The schema sharing source code is available:
  • The schema sharing source code was derived from the following tutorial:
Released: June 16, 2021
Developed by: Hasura
Category: Core Concepts