Skip to content

Instantly share code, notes, and snippets.

@hitomipupil
hitomipupil / linkedin.sql
Created June 19, 2024 14:28
Week2 : Exercise3 : Hitomi
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
firstname VARCHAR(50),
lastname VARCHAR(50),
username VARCHAR(50),
pass VARCHAR(50)
);
CREATE TABLE schools (
id INT AUTO_INCREMENT PRIMARY KEY,
@hitomipupil
hitomipupil / formula1.sql
Created June 19, 2024 14:24
Week2 : Exercise3 : Hitomi
CREATE TABLE Team (
id INTEGER NOT NULL,
name TEXT NOT NULL,
country TEXT,
PRIMARY KEY (id)
);
CREATE TABLE Car (
carNumber INTEGER,
wieght INTEGER,
@hitomipupil
hitomipupil / gist:284e89bf04c9bec94b7a2fa5055ef0ec
Created June 16, 2024 09:46
databases-week1-exercises.sql
-- 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%';