<s>[INST] Write a SQL code to calculate the average total distance covered in all orders.  [/INST] SELECT AVG(order_totaldistance) AS average_total_distance FROM order_transaction.transaction_detail_deprecated; </s>