X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=sql-grep-to-ids.sh;h=e700f1a37a057c2202ca75623d391edf5577b21c;hb=49a2ecb401809105e5b1ccc23d1726b881195482;hp=0dafbbb54aef50408d9fc0abbf03dd190b677bc6;hpb=b7e4668cfccc1f10f6dc89407823b661408260e0;p=zc 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"