From: Barış Metin <Talip-Baris.Metin@sophia.inria.fr>
Date: Fri, 24 Sep 2010 09:31:49 +0000 (+0200)
Subject: spot duplicated accounts
X-Git-Tag: myplc-5.0-10~1^2
X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=3ee3b640d356a754e355b4109d9be64eb232550b;p=myplc.git

spot duplicated accounts
---

diff --git a/bin/spot-dup-accounts.sh b/bin/spot-dup-accounts.sh
new file mode 100755
index 0000000..b7238f6
--- /dev/null
+++ b/bin/spot-dup-accounts.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+DB=planetlab5
+USER=pgsqluser
+CMD="select email, count(email) from persons where deleted=false group by email having count(email) > 2;"
+
+psql -U $USER $DB -c "$CMD"