Solution to Activity 4.1
In this activity, you will collect some information from the world
schema to add bits of trivia to some of the articles in next month's edition of a travel magazine. Follow these steps to complete this activity:
- Connect to the
world
schema with the MySQL client:USE world;
This query produces the following output:
- Write the following query to check the size of the smallest city in the database:
SELECT Name, Population FROM city ORDER BY Population LIMIT 1;
This query produces the following output:
Here, you used the city
table, sorted by Population
, and finally, selected the name
and population
fields.
- Write the following query to check the number of languages spoken in India:
SELECT Code FROM country WHERE name='India'; SELECT * FROM countrylanguage...