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