<s>[INST] Write a SQL code to calculate the average Merchant Discount Rate (MDR) cost incurred by merchants for all orders.  [/INST] SELECT AVG(order_merchant_cost_mdr) AS average_merchant_mdr_cost FROM order_transaction.transaction_detail_deprecated; </s>