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;
Discussion 0
Join free to post in the discussion.
Related questions
- Purpose of a primary keyDatabase Administrator
- Durability in ACIDDatabase Administrator
- INNER JOIN vs LEFT JOINDatabase Administrator
- DELETE vs TRUNCATEDatabase Administrator
- Filtering rows where a value is NULLDatabase Administrator
- COUNT(*) vs COUNT(column)Database Administrator
- What a foreign key enforcesDatabase Administrator
- WHERE vs HAVINGDatabase Administrator