Skip to content

Instantly share code, notes, and snippets.

@ovnicraft
Created January 31, 2014 21:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ovnicraft/8744024 to your computer and use it in GitHub Desktop.
Save ovnicraft/8744024 to your computer and use it in GitHub Desktop.
update project_project set amount_budget=sq.amount from (select project_id, sum(planned_amount) as amount from project_task group by project_id) sq where project_project.id=sq.project_id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment