Task: Text to Code
Input (English): select the rows whose flag record fuzzily matches to united kingdom . the average of the tonnage ( grt ) record of these rows is 5983.8 .
Output (English): round_eq { avg { filter_eq { all_rows ; flag ; united kingdom } ; tonnage ( grt ) } ; 5983.8 }