LISHAN GEBREMARIAM
This databases is designed to help persons find friends when they move to a new city.
1.Person: id, name, email, city_id
2.City: id, name, state, country
1. What are the names of countries with population greater than 8 million? | |
SELECT Name | |
FROM country | |
WHERE Population > 8000000; | |
2. What are the names of countries that have “land” in their names? | |
SELECT Name | |
FROM country | |
WHERE Name LIKE '%land%'; |
-- Create Users table | |
CREATE TABLE Users ( | |
user_id INT AUTO_INCREMENT PRIMARY KEY, | |
first_name VARCHAR(50) NOT NULL, | |
last_name VARCHAR(50) NOT NULL, | |
username VARCHAR(50) UNIQUE NOT NULL, | |
password VARCHAR(50) NOT NULL | |
); | |
-- Create Schools table |