spot duplicated accounts
Barış Metin [Fri, 24 Sep 2010 09:31:49 +0000 (11:31 +0200)]
bin/spot-dup-accounts.sh [new file with mode: 0755]

diff --git a/bin/spot-dup-accounts.sh b/bin/spot-dup-accounts.sh
new file mode 100755 (executable)
index 0000000..b7238f6
--- /dev/null
@@ -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"