Skip to content

Instantly share code, notes, and snippets.

@trietphm
Created August 8, 2019 15:28
Show Gist options
  • Save trietphm/d642ce6e874402a593a9ba2bebee31d1 to your computer and use it in GitHub Desktop.
Save trietphm/d642ce6e874402a593a9ba2bebee31d1 to your computer and use it in GitHub Desktop.
CREATE TABLE students(
id serial PRIMARY KEY,
name TEXT,
mark INTEGER,
age INTEGER,
subject TEXT
);
INSERT INTO students(name, mark, age, subject)
VALUES
('John', 9, 15, 'Math'),
('Thomas', 2, 15, 'Math'),
('Alice', 6, 14, 'Math'),
('Tom', 9, 13, 'History'),
('Bob', 9, 13, 'History'),
('Nancy', 7, 12, 'History'),
('Will', 7, 17, 'History'),
('El', 3, 13, 'History'),
('Jones', 9, 13, 'Biology'),
('Smith', 8, 13, 'Biology'),
('Daisy', 8, 13, 'Biology'),
('Jerry', 8, 13, 'Biology'),
('Eric', 6, 13, 'Biology'),
('Logan', 7, 13, 'Biology')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment