Quote:
Originally Posted by Ether
I haven't done SQL in decades. I just cobbled up an AWK script to read the match_teams table.
Code:
(ac=="red") && ($3=="red"){red+=$4; next}
(ac=="blue") && ($3=="blue"){blue+=$4; next}
(ac=="red") && ($3!="red"){
if(red>max){max=red; idmax=$1}
if(red<min){min=red; idmin=$1}
ac="blue"; blue=$4; next}
(ac=="blue") && ($3!="blue"){
if(blue>max){max=blue; idmax=$1}
if(blue<min){min=blue; idmin=$1}
ac="red"; red=$4; next}
|
I had to do a little AWK research. If I read this correctly, your idmax and idmin will point to the record in match_teams that immediately follows the max/min alliances?
It's amazing how many tools there are to accomplish a given task. Always something new to learn.