From: Dobrica Pavlinusic Date: Fri, 31 Mar 2023 11:54:16 +0000 (+0200) Subject: order by time X-Git-Url: http://git.rot13.org/?p=zc;a=commitdiff_plain;h=49a2ecb401809105e5b1ccc23d1726b881195482 order by time --- diff --git a/sql-grep-to-ids.sh b/sql-grep-to-ids.sh index 0dafbbb..e700f1a 100755 --- a/sql-grep-to-ids.sh +++ b/sql-grep-to-ids.sh @@ -3,4 +3,4 @@ ids=$( grep $1 subvision-numbers.txt | awk '{ print $2 }' | xargs echo -n | sed 's/ /,/g' ) #echo "select pn,count(pn),min(time),max(time) from zc where pn in ($ids) group by pn order by max" | psql zc echo "select (select sub from sub where pn = zc.pn),(select name from sub where pn = zc.pn),pn,count(pn),min(time),max(time) from zc where pn in ($ids) group by pn order by max" | psql zc -echo "select * from zc where pn in ($ids) | psql zc" +echo "select * from zc where pn in ($ids) order by time | psql zc"