/*
select
customer
, min(first_order_date) as first_order_date
from
(select contact_first as customer
, order_date as first_order_date
, rank() over(partition by contact_first order by order_date) as ra
from customer
join sales using(cust_no)
where ship_date is null) t
group by customer
*/
select * from sales