-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathiekstudents.portable.sql
More file actions
42 lines (35 loc) · 1.12 KB
/
iekstudents.portable.sql
File metadata and controls
42 lines (35 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
-- Portable SQL seed for the iekstudents dataset
-- Cross-dialect and PostgreSQL-safe.
BEGIN;
DROP TABLE IF EXISTS dinners;
DROP TABLE IF EXISTS tourneys;
CREATE TABLE dinners (
id INTEGER GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
name VARCHAR(30),
birthdate DATE,
entree VARCHAR(30),
side VARCHAR(30),
dessert VARCHAR(30)
);
INSERT INTO dinners (name, birthdate, entree, side, dessert) VALUES
('Manolis', '2003-01-19', 'steak', 'salad', 'cake'),
('Thanos', '2003-01-25', 'chicken', 'fries', 'ice cream'),
('Sara', '2005-02-18', 'tofu', 'fries', 'cake'),
('Elpida', '2004-12-25', 'tofu', 'salad', 'ice cream'),
('Georgia', '2006-05-28', 'steak', 'fries', 'ice cream'),
('Sali', '1990-01-01', 'chicken', 'fries', 'ice cream');
CREATE TABLE tourneys (
id INTEGER GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
name VARCHAR(30),
wins DOUBLE PRECISION,
best DOUBLE PRECISION,
size DOUBLE PRECISION
);
INSERT INTO tourneys (name, wins, best, size) VALUES
('Manolis', 7, 245, 44),
('Thanos', 4, 280, 45),
('Sara', 9, 266, 38),
('Elpida', 2, 200, 37),
('Georgia', 2, 197, 37),
('Sali', 13, 283, 46);
COMMIT;