1
0
mirror of https://github.com/hasura/graphql-engine.git synced 2024-12-25 16:36:31 +03:00
graphql-engine/docs/examples_schema_migrations/1531128195815_run_sql_migration.up.yaml
2018-09-11 16:41:24 +05:30

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