Comment Comment by billwashere select distinct customer_id, max(order_id) over (partition by customer_id order by created_date desc) FROM ordershttp://sqlfiddle.com/#!15/51df39/2 parent billwashere 3 years ago
http://sqlfiddle.com/#!15/51df39/2