Question: SQL Programming This is the question I am working on. Display the number of years that each country has been independent in ascending order of
SQL Programming
This is the question I am working on. Display the number of years that each country has been independent in ascending order of years of independence. Display the difference between today's year (use Year and curdate functions to retrieve current year. DO NOT USE 2017) and the independence year.
Here is the Output from my Instructor:

And here is my Output

My question is, How do I get the correct output with the code that I have written?
SELECT Name,Continent,IndepYear,
DATEDIFF(CURDATE(), IndepYear) AS 'yearIndep' FROM country;
IndepYear yearsindep -1 Name Nigeria Germany Europe India Continent Africa 1960 1955 1947 1822 1776 660 1523 57 62 70 195 241 Asia South America razi United States North America Japan China Asia 2677 Asia 3540
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
