All our Data Science projects include bite-sized activities to test your knowledge and practice in an environment with constant feedback.
All our activities include solutions with explanations on how they work and why we chose them.
Write a SQL query that selects the Name and Continent columns from the country table. Then filter for countries in Asia or Oceania.
The first few rows of your result should match this image:
Retrieve the Name and CountryCode of cities from the city table whose CountryCode match USA, CAN, or MEX.
Your output should match the image below:
From the countrylanguage table, write a query that selects the Language, CountryCode and IsOfficial of countries where the official language is English, French, or Spanish. Fetch only rows where the language is one of the three specified and where it's marked True (T)as the official language.
Your output should match the image below:
From the country table, count the total number of rows where the GovernmentForm matches Constitutional Monarchy.
Select the Name, GNP, and GNPOld values from the country table for countries with the codes USA and JPN.
Your output should match the image below:
Count the total number of countries located in either the Caribbean or Southeast Asia regions in the country table; using the IN operator for filtering multiple regions.
From the country table, retrieve all countries with a population between 60 million and 90 million.
Your output should match the image below
Select cities with populations between 1 million and 5 million from the city table.
The first few rows of your output should match the image below:
Filter the LifeExpectancy column in the country table for a life expectancy between 80 and 90 years.
Your output should match the image below:
Filter the IndepYear column in the country table to capture the specified time frame for independence.
Your output should match the iumage below:
Use the BETWEEN operator to filter the SurfaceArea column in the country table for the specified criteria, and order the results in descending order by SurfaceArea.
Your output should match the image below:
Calculate the GNP-to-population ratio and display it as GNP_Per_Capita. Filter the LifeExpectancy column in the country table to select countries with a life expectancy between 40 and 60 years.
Your output should match the image below:
Retrieve the Name, Continent and Population of countries in the country table located in Asia and Europe with populations between 1 million and 2 million.
Your output should match the image below
From the country table, retrieve the Name, LifeExpectancy and Region of countries in Western Europe and North America with a life expectancy between 70 and 80 years.
Your output should match the image below:
Retrieve countries with a GNP between 1 and 10 million and a government form of either Republic or Federal Republic from the country table.
Your output should match the image below
Filter the country table using both the IN and BETWEEN operators to retrieve the Name, Continent, and Population of countries located in either Asia or Africa with populations between 5 and 20 million
The first few rows of your output should match the image below:
You're to retrieve countries with a government form of Monarchy and a GNP between 1,000 and 10,000 from the country table, ordering the results in descending order by GNP.
Your output should match the image below