Q016warning

group_by needs many

group_by is used with a command other than many.

db/queries/example.sql:1:1: warning[Q016]: sgl.group_by is valid only with the many command; query "GetAuthorBooks" uses one
Printed by sgl from a small PostgreSQL reproduction project.

When it is reported

Grouping collapses several rows into each parent, which needs a query that returns many rows.

How to fix it

Use the many command, or remove group_by.

See it in an example

In your terminal

$ sgl explain Q016

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