graphql-engine/docs/examples_schema_migrations/1531128195815_run_sql_migration.up.yaml

12 lines
292 B
YAML
Raw Normal View History

- 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