Q015warning

group_by without an embed

group_by is set but no sgl.embed groups the joined table's columns.

db/queries/example.sql:1:1: warning[Q015]: sgl.group_by on query "ListAuthorBooks" requires at least one sgl.embed directive on non-key tables
Printed by sgl from a small PostgreSQL reproduction project.

When it is reported

group_by only makes sense when child rows are embedded into their parent row.

How to fix it

Add an sgl.embed for the joined table, or remove group_by.

See it in an example

In your terminal

$ sgl explain Q015

Look for GroupByMissingEmbed in Seagull's source to see where it is reported.