Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Archive Old Orders

Write the statements that move all orders placed before 2026-01-01 from Orders into Orders_Archive (same columns) and remove them from Orders.

Table schema

Orders(id INT PRIMARY KEY, order_date DATE, amount INT)
Orders_Archive(id INT PRIMARY KEY, order_date DATE, amount INT)

Sample data

Orders:
id | order_date | amount
1 | 2025-12-20 | 100
2 | 2026-01-05 | 200
3 | 2025-06-01 | 50

Orders_Archive: empty

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.