tweak column display

This commit is contained in:
Eric House 2014-02-24 08:00:43 -08:00
parent b840f7d708
commit cd31cd432a

View file

@ -22,7 +22,7 @@ while [ $# -gt 0 ]; do
done
QUERY="WHERE NOT -NTOTAL = sum_array(nperdevice)"
COLUMNS=" dead, connname,cid,room,pub, lang, ntotal, nperdevice, ack,nsent,ctime,mtimes"
COLUMNS_AS="dead as D,connname,cid,room,pub as P,lang as L,ntotal as n,nperdevice as nper,ack,nsent,ctime,mtimes"
COLUMNS=" dead, connname,cid,room,pub, lang, ntotal, nperdevice, ack,nsents,ctime,mtimes"
COLUMNS_AS="dead as D,connname,cid,room,pub as P,lang as L,ntotal as n,nperdevice as nper,ack,nsents,ctime,mtimes"
echo "SELECT $COLUMNS_AS FROM ( SELECT $COLUMNS, unnest(mtimes) FROM games $QUERY) AS set GROUP BY $COLUMNS ORDER BY max(unnest) DESC LIMIT $LIMIT;" | psql xwgames
echo "SELECT $COLUMNS_AS FROM ( SELECT $COLUMNS, unnest(mtimes) FROM games $QUERY) AS set GROUP BY $COLUMNS ORDER BY ctime DESC LIMIT $LIMIT;" | psql xwgames