#!/bin/sh
export PGPASSWORD=PYnuOIXNbkVOvdTL
P="psql -h 127.0.0.1 -U bgar1_delta_com -d bgar1_delta_com_ingredi -tA"
echo "== auth_object types"
$P -F' | ' -c "select type, provider_id, count(*) from auth_object group by 1,2 order by 3 desc"
echo "== provider 8 type 2"
$P -F' | ' -c "select id,name from auth_object where provider_id=8 and type=2 order by name" | head -40
echo "== teams schema"
$P -c "select column_name from information_schema.columns where table_name='support_desk_teams' order by ordinal_position" | tr '\n' ' '; echo
$P -F' | ' -c "select team_id, name from support_desk_teams order by 1" 2>/dev/null | head -15
