Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Challenge: Calculate Order Age | Date and Time Functions
Functions in SQL

bookChallenge: Calculate Order Age

Tâche

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_id and order_date columns.
  • Calculate the number of days between the current date and the order_date for each order.
  • Include this value in the result set as days_since_order.

Solution

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 2. Chapitre 2
single

single

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

Suggested prompts:

Can you explain this in simpler terms?

What are the main points I should remember?

Can you give me an example?

close

bookChallenge: Calculate Order Age

Glissez pour afficher le menu

Tâche

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_id and order_date columns.
  • Calculate the number of days between the current date and the order_date for each order.
  • Include this value in the result set as days_since_order.

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 2. Chapitre 2
single

single

some-alt