Back in the saddle...
Counts on CSV (transaction?) extract from Derek's Watchernode for KAU. Out-of-date by about a month. No matter. Our purpose here is to extend our box of tools. In public. So that others can chip in, criticize and improve the tools. Use the tools themselves, adapt them. Learn from them. In the open source ethic.
End result counts (last column):
How to do it within a couple of minutes from first principles (without using SQL):
To see the actual layout of all 5 records, one after each other and then side by side with their KAG equivalents, see my upcoming reply below.
Counts on CSV (transaction?) extract from Derek's Watchernode for KAU. Out-of-date by about a month. No matter. Our purpose here is to extend our box of tools. In public. So that others can chip in, criticize and improve the tools. Use the tools themselves, adapt them. Learn from them. In the open source ethic.
End result counts (last column):
Code:
0 create_account 37412
1 payment 8336
5 set_options 123
8 account_merge 36540
9 inflation 27
Code:
Will create temporary throw-away files t1 t2 t3 etc...
linux> KAU_extract=../Blockchain-Exploration/KAU/stellar-export-KAU-2023-02-24-T09\:37\:45-UTC.csv
linux> cat $KAU_extract | sed 's/"//g' | awk -F, 'NR>1 {print $4, $5}' | sort -u | sort -k2
create_account 0
payment 1
set_options 5
account_merge 8
inflation 9
cat $KAU_extract | sed 's/"//g' | awk -F, 'NR>1 {print $4, $5}' | sort -u | sort -k2 > t1
linux> for i in 0 1 5 8 9; do echo $i; sed '1d' $KAU_extract | sed 's/"//g' | awk -F, -v x=$i '($5==x) {print}' | wc -l; done
0
37412
1
8336
5
123
8
36540
9
27
for i in 0 1 5 8 9; do echo $i; sed '1d' $KAU_extract | sed 's/"//g' | awk -F, -v x=$i '($5==x) {print}' | wc -l; done > t
cat t | sed -n 1~2p > t2
cat t | sed -n 2~2p > t3
linux> cat t | sed -n 1~2p > t2
linux> cat t | sed -n 2~2p > t3
paste t[2-3]
0 13774
1 3421
5 123
8 12803
9 28
linux> paste t[2-3] > t4
linux> cat t4
0 13774
1 3421
5 123
8 12803
9 28
linux> join -1 2 -2 1 <(sort -k2 t1) t4
0 create_account 37412
1 payment 8336
5 set_options 123
8 account_merge 36540
9 inflation 27