<s>[INST] Write a SQL code to calculate the average order_total_amount for each delivery district in Thai (Thailand).  [/INST] SELECT order_delivery_district_th, AVG(order_total_amount) AS average_order_total_amount FROM order_transaction.transaction_detail_deprecated GROUP BY order_delivery_district_th; </s>