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

Combine Active and Archived Orders

Return all orders from both tables with a source label ('active' or 'archived'), ordered by id.

Table schema

ActiveOrders(id INT, amount INT)
ArchivedOrders(id INT, amount INT)

Sample data

ActiveOrders
id | amount
1 | 100
3 | 50

ArchivedOrders
id | amount
2 | 70
4 | 30

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.