MySQL Query world_x database
MySQL Query world_x database
Using the MySQL world_x database, list the codes for countries where English is spoken by more than 30% of the population.
Answer:
List the codes for countries where English is spoken by more than 30% of the population.
You need to join the tables Country and CountryLanguage.
Sample SQL query is as follows:
SELECT C.Code
FROM Country C, CountryLanguage CL
WHERE C.Code = CL.CountryCode
AND CL.Language = 'English'
AND CL.Percentage > 30 ;