I have been trying to work this problem out for hours. My numbers are about a year off. Can someone please tell me what I am doing wrong?
Here is the question and expected results:
Create a list of student names from area code 203 along with the number of years
since they registered (show 2 decimal places on all values).
Sort the list on the number of years from highest to lowest.
Here is my code and results:
SELECT First_Name,
Last_Name,
TO_CHAR((ROUND(SYSDATE - registration_date) / 365), '9.99') AS YEARS
FROM Student
WHERE Phone LIKE '203-%%%-%%%%'
ORDER BY Years DESC ;