medium10 pts · first answer countswindow-functionssql
Previous order from another customer
An analyst computes days since the previous order with LAG(order_date) OVER (ORDER BY customer_id, order_date). Some customers' first orders show a gap. Why?
Discussion 0
Join free to post in the discussion.