Please view attachment before answering. The attachment is the table and its contents. I am in need of assistance with both part A. I am unsure on how i can go about attempting the question. I am using mysql terminal. Please explain solution in detail so i can fully understand . Attaching a visual will be of great help as well. (as in a screenshot or so) Thank you so much in advance! Part A - Display the employee number, hire date, number of months employed, last day of the hire month from employee. Give the number of months employed as ‘months_worked’ Hint: Use TIMESTAMPDIFF(month,hire_date,CURDATE()) to get the number of months employed. Use LAST_DAY() with appropriate argument to get the last day of the hire month
Please view attachment before answering. The attachment is the table and its contents. I am in need of assistance with both part A. I am unsure on how i can go about attempting the question. I am using mysql terminal. Please explain solution in detail so i can fully understand . Attaching a visual will be of great help as well. (as in a screenshot or so) Thank you so much in advance!
Part A - Display the employee number, hire date, number of months employed, last day of the hire month from employee. Give the number of months employed as ‘months_worked’
Hint: Use TIMESTAMPDIFF(month,hire_date,CURDATE()) to get the number of months employed. Use LAST_DAY() with appropriate argument to get the last day of the hire month


Step by step
Solved in 3 steps with 4 images









