{ $0 = toupper($0) }
Converts to lowercase the record
$2 == "FROM" || $2 == "INTO"
Select record if field1 is equal to FROM or INTO.
In that case the two words to select ared field1 and field3.
{ count[$1,$3]++ }
The 'count' array contains the occurrence number of the two words.
The entry for the two words is incremented by 1.
$3 == "SET" { count[$1,$2]++ }
Select record if field2 is equal to SET.
In that case the two words to select ared field1 and field2.
{ count[$1,$2]++ }
The entry for the two words is incremented by 1.
[COLOR=blue]END { . . . }[/COLOR
The code is executed when all records of the input file are read.
for (indx in count) { . . . }
The code is executed for every index of the 'code' array.
The index is formed by the multiple subsiptes separated by the character SUBSEP.
For example, the index for the element count["aaa","bbb"] is the equivalent to count["aaaSUBSEPbbb"].
The for variable 'indx' of the loop is assigned this second form of the index.
split(indx, i, SUBSEP)
The index is split into the 'i' array, the character SUBSEP is used as delimiter into 'index'
indx="aaaSUBSEPbbb" => i[1]="aaa" i[2]="bbb"
print i[1],i[2],count[indx]
print the two words and the number of occurrence
Hope This Help (

PH)