SELECT regular_order_id FROM Actual_Orders WHERE "regular_order_id" < 4 AND "actual_order_id" < 4 OR order_status_code = "Cancel" OR actual_order_date != "2018-03-12 05:33:57" UNION SELECT regular_order_id FROM Regular_Orders WHERE "distributer_id" = 3 AND "regular_order_id" != 1 <table_name> : Actual_Orders col : actual_order_id | order_status_code | regular_order_id | actual_order_date row 1 : 1 | Success | 8 | 2018-03-02 23:26:19 row 2 : 2 | Cancel | 15 | 2018-03-02 08:33:39 row 3 : 3 | Cancel | 4 | 2018-02-25 10:13:36 row 4 : 4 | Cancel | 10 | 2018-03-21 01:34:52 row 5 : 5 | Cancel | 14 | 2018-02-28 15:31:06 row 6 : 6 | Success | 12 | 2018-03-12 05:33:57 row 7 : 7 | Success | 1 | 2018-03-06 12:20:31 row 8 : 8 | Cancel | 11 | 2018-03-22 19:30:17 row 9 : 9 | Success | 6 | 2018-03-13 05:43:25 row 10 : 10 | Success | 13 | 2018-03-05 17:31:36 row 11 : 11 | Cancel | 4 | 2018-03-16 00:28:09 row 12 : 12 | Cancel | 12 | 2018-02-26 01:55:52 row 13 : 13 | Cancel | 8 | 2018-03-11 10:45:05 row 14 : 14 | Cancel | 4 | 2018-03-12 11:24:59 row 15 : 15 | Cancel | 7 | 2018-03-10 18:22:34 <table_name> : Regular_Orders col : regular_order_id | distributer_id row 1 : 1 | 12 row 2 : 2 | 15 row 3 : 3 | 6 row 4 : 4 | 3 row 5 : 5 | 8 row 6 : 6 | 14 row 7 : 7 | 2 row 8 : 8 | 15 row 9 : 9 | 10 row 10 : 10 | 7 row 11 : 11 | 3 row 12 : 12 | 1 row 13 : 13 | 1 row 14 : 14 | 15 row 15 : 15 | 15
col : regular_order_id row 1 : 1 row 2 : 4 row 3 : 6 row 4 : 7 row 5 : 8 row 6 : 10 row 7 : 11 row 8 : 12 row 9 : 13 row 10 : 14 row 11 : 15