From 3ee3b640d356a754e355b4109d9be64eb232550b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Fri, 24 Sep 2010 11:31:49 +0200 Subject: [PATCH] spot duplicated accounts --- bin/spot-dup-accounts.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 bin/spot-dup-accounts.sh 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" -- 2.43.0