Challenge: Calculate Order Age
Task
Swipe to start coding
Write a query to calculate the number of days since each order was placed, using the orders table.
- Select the
order_idandorder_datecolumns. - Calculate the number of days between the current date and the
order_datefor each order. - Include this value in the result set as
days_since_order.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 2. ChapterΒ 2
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Suggested prompts:
Can you explain this in simpler terms?
What are the main points I should remember?
Can you give me an example?
Awesome!
Completion rate improved to 2.86
Challenge: Calculate Order Age
Swipe to show menu
Task
Swipe to start coding
Write a query to calculate the number of days since each order was placed, using the orders table.
- Select the
order_idandorder_datecolumns. - Calculate the number of days between the current date and the
order_datefor each order. - Include this value in the result set as
days_since_order.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 2. ChapterΒ 2
single