Free courses in AI, Data Science & Machine Learning Written lessons · Quizzes · Final exams
Future Data Academy
Log inGet started ↗
← Practice labSQLITE · FREE · RUNS ON YOUR DEVICE

Previous order amount

Return id and previous_amount using LAG within customer by ordered_at,id, any status. Order output by id.

Loading the SQL engine…

Queries run locally, with an eight-second execution limit and a 500-row result limit. Signed-in learners can save exercise queries to their academy account. Practice results never change course grades or certificates.