Skip to content

Instantly share code, notes, and snippets.

View Lishan6's full-sized avatar

Lishan Lishan6

  • Gent, Belgium
  • 00:29 (UTC -12:00)
View GitHub Profile
@Lishan6
Lishan6 / databases-week1-exercises.sql
Last active June 19, 2024 17:28
Databases Week 1 Exercises
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%';
@Lishan6
Lishan6 / Exercise 4-linkedin.sql
Last active June 19, 2024 17:32
databases-week2-Exercise
-- 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
@Lishan6
Lishan6 / DESIGN.md
Last active June 26, 2024 20:37
databases-week3-Exercise

LISHAN GEBREMARIAM

Friend Finder Database Design Overview

This databases is designed to help persons find friends when they move to a new city.

Entities and Attributes

1.Person: id, name, email, city_id

2.City: id, name, state, country