title: Duplicating values in a column for all rows in a given id
body: <p>I have a table of Ids with "orders" and "shipment" timestamps.  Most Ids will have both "orders" and "shipment" rows, but some Ids will only have shipment. I want to implement a If-Then Logic where if I see an order row, then retrieve the timestamp.  If an Id does not contain an Order row, then I will resort to retrieving the "shipment" timestamp.</p>
  
  <p>One way I was trying to solve this was creating a case statement to create a new 'Orders' column and populate that specific timestamp for each Orders and Shipment Row.  I'll create a subquery where if Orders column is not null, then use that timestamp.  Or if Orders column is null, then use the shipment timestamp.</p>
  
  <p>I can't simply just filter by rows = "orders" because it'll eliminate the IDs that only contains shipments</p>
  
  <p>Original Table:</p>
  
  <pre><code>id    Type     Date    
  1     orders    3/28     
  1     shipment    3/23    
  </code></pre>
  
  <p>Expected Result:</p>
  
  <pre><code>id    Type       Date    Orders_Column
  1     orders      3/28    3/28
  1     shipment     3/23   3/28
  </code></pre>