<s>[INST] Write a SQL code to find the total number of orders for each unique OTI card reference.  [/INST] SELECT order_oti_card_ref, COUNT(*) AS total_orders FROM order_transaction.transaction_detail_deprecated GROUP BY order_oti_card_ref; </s>