spot duplicated accounts
[myplc.git] / bin / spot-dup-accounts.sh
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"