Question: MySQL Query 8. Use the UNION operator to generate a result set consisting of three columns from the Orders table: ship_status A calculated column that

8. Use the UNION operator to generate a result set consisting of three columns from the Orders table: ship_status A calculated column that contains a value of SHIPPED or NOT SHIPPED order_id The order_id column order_date The order_date column If the order has a value in the ship date column, the ship status column should contain a value of SHIPPED. Otherwise, it should contain a value of NOT SHIPPED. Sort the final result set by the order_date column. Table 1 ship_status order_id order_Date SHIPPED 1 2018-03-28 09:40:28 SHIPPED N 2018-03-28 11:23:20 SHIPPED 3 2018-03-29 09:44:58 SHIPPED 4 2018-03-30 15:22:31 SHIPPED 5 2018-03-31 05:43:11 NOT SHIPPED 6 2018-03-31 18:37:22 SHIPPED 7 2018-04-01 23:11:12 NOT SHIPPED 00 2018-04-02 11:26:38 NOT SHIPPED 9 2018-04-03 12:22:31
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
