Task: Text to Code
Input (English): Step 1: For each row in Suppliers table, find the corresponding rows in Product_Suppliers table.
Step 2: for each value of supplier_name in the results of step 1, calculate average total_value_purchased.
Step 3: show each value of supplier_name in the results of step 1 along with the average total_value_purchased with largest value in the results of step 2
Output (English): SELECT T1.supplier_name , Avg ( T2.total_value_purchased ) FROM Suppliers AS T1 JOIN Product_Suppliers AS T2 ON T1.supplier_id = T2.supplier_id GROUP BY T1.supplier_name ORDER BY Avg ( T2.total_value_purchased ) Desc LIMIT 1