From c6bef408cbdfaf6c7695a765455db79a1aa1bac0 Mon Sep 17 00:00:00 2001 From: Changaco Date: Fri, 13 Jun 2014 10:09:53 +0200 Subject: [PATCH] remove branch.sql --- branch.sql | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 branch.sql diff --git a/branch.sql b/branch.sql deleted file mode 100644 index 994bdd68d6..0000000000 --- a/branch.sql +++ /dev/null @@ -1,17 +0,0 @@ -BEGIN; - - CREATE OR REPLACE TEMPORARY VIEW total_receiving AS - SELECT tippee, sum(amount) AS amount - FROM current_tips - JOIN participants p ON p.username = tipper - WHERE p.is_suspicious IS NOT TRUE - AND p.last_bill_result = '' - GROUP BY tippee; - - UPDATE participants - SET receiving = amount - FROM total_receiving - WHERE tippee = username - AND receiving <> amount; - -END;