You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a subquery, if I specify an output column name for GROUP BY, sqlc cannot compile it. if I execute SQL directly, it works fine.
I am aware that when using PostgreSQL, column output names can be specified as GROUP BY. However, if I am mistaken, please let me know.
Relevant log output
No response
Database schema
CREATETABLEspam (
id SERIALPRIMARY KEY
);
SQL queries
-- name: Spam :manySELECTs.idAS"s_id"FROM-- Using subqueries doesn't work.
(
SELECTspam.idFROM spam
) AS"s"-- Change this to s.id and it will work.GROUP BY s_id;