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