Task: Text to Code
Input (English): Step 1: For each row in Bookings table, find the corresponding rows in Payments table.
Step 2: find the number of rows of each value of Payments's booking_id in the results of step 1.
Step 3: find Bookings's booking_id, amount_paid of step 1 results with largest value in the results of step 2
Output (English): SELECT T1.booking_id , T2.amount_paid FROM Bookings AS T1 JOIN Payments AS T2 ON T1.booking_id = T2.booking_id GROUP BY T2.booking_id ORDER BY Count ( * ) Desc LIMIT 1