select order_id,customer_name,order_date from customers join (select customer_id,order_id,order_date,dense_rank() over(partition by customer_id order by order_date desc ) as rk from orders) as r on customers.customer_id = r.customer_id where r.rk = 1