Skip to content
RED SAGSkills
medium10 pts · first answer countstransactionsrow-lockssql

FOR UPDATE with GROUP BY fails

This query fails in PostgreSQL with "FOR UPDATE is not allowed with GROUP BY clause". Why?

SELECT account_id, sum(amount) FROM entries
GROUP BY account_id FOR UPDATE;
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions