Skip to content
RED SAGSkills
hard20 pts · first answer countssqlwindow-functionsdata-quality

Latest order changes between runs

You pick each customer's latest order with ROW_NUMBER() OVER (PARTITION BY customer_id ORDER BY order_date DESC) and keep rn = 1. Some customers show a different order each time the report runs. Why?

Choose one answer