Cities With Over One Million Population

Beginner

In this project, you will learn how to access MySQL, import data, and query cities with a population over one million from the `city` table.

SQLMySQL

Introduction

In this project, you will learn how to access MySQL, import data, and query cities with a population over one million from the city table.

👀 Preview

MariaDB [world]> SOURCE /home/labex/project/getMillion.sql;
+------+--------------+-------------+----------+------------+
| ID   | Name         | CountryCode | District | Population |
+------+--------------+-------------+----------+------------+
| 1907 | Shijiazhuang | CHN         | Hebei    |    2041500 |
| 1924 | Tangshan     | CHN         | Hebei    |    1040000 |
+------+--------------+-------------+----------+------------+
2 rows in set (0.001 sec)

ðŸŽŊ Tasks

In this project, you will learn:

  • How to start the MySQL service and access MySQL using the sudo command
  • How to import data from a SQL file into the MySQL database
  • How to query the city table to retrieve information for cities in the Hebei region with a population over one million

🏆 Achievements

After completing this project, you will be able to:

  • Manage a MySQL database, including starting the service and importing data
  • Write SQL queries to retrieve specific information from a database table
  • Demonstrate your understanding of working with MySQL and SQL queries

Teacher

labby

Labby

Labby is the LabEx teacher.