Task: Text to Code
Input (English): select the row whose average record of all rows is 2nd maximum . the team record of this row is river plate .
Output (English): eq { hop { nth_argmax { all_rows ; average ; 2 } ; team } ; river plate }