[2019-03-10 17:44:55]1234567 paid 10 10000
cat test.txt |tail -n +1 |sed 's/]/ ]g' |awk '{count[$3]+=$6}END{for(key in count) print key" "count[key]}' |sort -rnk2 |head -n 20
PS:
tail grep cat sed awk head sort