<s>[INST] Write a SQL code to find the total number of orders that used a promo code.  [/INST] SELECT COUNT(*) AS total_orders_with_promo_code FROM order_transaction.transaction_detail_deprecated WHERE order_promo_code IS NOT NULL; </s>