<s>[INST] Write a SQL code to find the earliest and latest date of the week for all orders.  [/INST] SELECT MIN(order_lastdateofweek) AS earliest_week, MAX(order_lastdateofweek) AS latest_week FROM order_transaction.transaction_detail_deprecated; </s>