From 5fb8c9e17e9fca7835e5e940c53422e2b90078b9 Mon Sep 17 00:00:00 2001 From: kanoi Date: Fri, 2 Oct 2015 16:13:18 +1000 Subject: [PATCH] sql - add some more stats to rollback.sh --- sql/rollback.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sql/rollback.sh b/sql/rollback.sh index 41df058d..01a18060 100755 --- a/sql/rollback.sh +++ b/sql/rollback.sh @@ -120,8 +120,8 @@ process() if [ "$opt" = "-c" ] ; then echo "\\echo 'count markersummary'" echo "select count(*),min(markerid) as min_markerid,max(markerid) as max_markerid," - echo " sum(diffacc) as sum_diffacc,min(firstshareacc) as min_firstshareacc," - echo " max(lastshareacc) as max_lastshareacc" + echo " sum(diffacc) as sum_diffacc,min(firstshare) as min_firstshare," + echo " max(lastshareacc) as max_lastshareacc,max(lastshare) as max_lastshare" echo " from markersummary where markerid in" echo " (select distinct markerid from workmarkers where workinfoidend >= $wi);" fi @@ -158,12 +158,14 @@ process() # if [ "$opt" = "-c" ] ; then echo "\\echo 'count blocks'" - echo "select count(*),min(workinfoid) as min_workinfoid," - echo " max(workinfoid) as max_workinfoid" + echo "select count(*),min(height) as min_height,max(height) as max_height," + echo " min(workinfoid) as min_workinfoid,max(workinfoid) as max_workinfoid" echo " from blocks where workinfoid >= $wi;" echo "\\echo 'count workinfo'" echo "select count(*),min(workinfoid) as min_workinfoid," - echo " max(workinfoid) as max_workinfoid" + echo " max(workinfoid) as max_workinfoid,min(reward) as min_reward," + echo " max(reward) as max_reward,max(length(transactiontree)) as max_tree," + echo " min(createdate) as min_createdate,max(createdate) as max_createdate" echo " from workinfo where workinfoid >= $wi;" fi if [ "$opt" = "-r" ] ; then