order by time
authorDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 31 Mar 2023 11:54:16 +0000 (13:54 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 31 Mar 2023 11:54:16 +0000 (13:54 +0200)
sql-grep-to-ids.sh

index 0dafbbb..e700f1a 100755 (executable)
@@ -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"