# select customer_id, 1 if_placed_order # from customers_info # where not isnull(latest_place_order_date) # union all # select customer_id, 0 if_placed_order # from customers_info # where isnull(latest_place_order_date) select customer_id, if(latest_place_order_date,1,0) if_placed_order from custom...