#!/bin/sh
export PGPASSWORD=PYnuOIXNbkVOvdTL
P="psql -h 127.0.0.1 -U bgar1_delta_com -d bgar1_delta_com_ingredi -tA -F'|'"
$P -c "select name, count(*) from auth_object_attribute group by 1 order by 2 desc"
echo "== sample of each name"
$P -c "select distinct on (name) name, value from auth_object_attribute order by name, relation_id desc" | head -20
