mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 17:31:56 +03:00
12 lines
292 B
YAML
12 lines
292 B
YAML
|
- args:
|
||
|
sql: |-
|
||
|
CREATE VIEW author_average_rating AS
|
||
|
SELECT author.id, avg(article.rating)
|
||
|
From author, article
|
||
|
WHERE author.id = article.author_id
|
||
|
GROUP BY author.id
|
||
|
type: run_sql
|
||
|
- args:
|
||
|
name: author_average_rating
|
||
|
type: add_existing_table_or_view
|