<s>[INST] Write a SQL code to count the number of orders with non-null note entries.  [/INST] SELECT COUNT(*) AS total_orders_with_notes FROM order_transaction.transaction_detail_deprecated WHERE order_datetime IS NOT NULL; </s>