AL Distributors would like to know the number of months between the current date and the order date of an order. Write an SQL statement in MySQL that displays the order number and the number of months between the current date and the order date. The number of months should display as an integer. (Hint: You can nest one function within another function.) This is the code I haveSELECT FLOOR(MONTHS_BETWEEN(CURRENT_DATE,To_date(ORDER_DATE, 'MM/DD/YYYY')))num_monthsFROM ORDERS; is giving me an error Error Code: 1305. FUNCTION tal.MONTHS_BETWEEN does not exis

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter8: Working With Advanced Functions
Section: Chapter Questions
Problem 4RA
icon
Related questions
Question

TAL Distributors would like to know the number of months between the current date and the order date of an order. Write an SQL statement in MySQL that displays the order number and the number of months between the current date and the order date. The number of months should display as an integer. (Hint: You can nest one function within another function.) This is the code I haveSELECT FLOOR(MONTHS_BETWEEN(CURRENT_DATE,To_date(ORDER_DATE, 'MM/DD/YYYY')))num_monthsFROM ORDERS;
is giving me an error
Error Code: 1305. FUNCTION tal.MONTHS_BETWEEN does not exist    

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage