INSERT ALL WHEN Order_total < 10000 THEN INTO small_orders WHEN order_total > 10000 AND order_total < 20000 THEN INTO medium_orders WHEN order_total > 200000 AND order_total < 20000 THEN INTO large_orders SELECT order_id, order_total, customer_id FROM orders;