Skip to content

Instantly share code, notes, and snippets.

@syafiqfaiz
Last active August 23, 2023 12:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save syafiqfaiz/2269a4e468c510880756f761f63f019a to your computer and use it in GitHub Desktop.
Save syafiqfaiz/2269a4e468c510880756f761f63f019a to your computer and use it in GitHub Desktop.
SQL dump for sql introduction class
DROP TABLE IF EXISTS "public"."todo_items";
-- This script only contains the table creation statements and does not fully represent the table in the database. It's still missing: indices, triggers. Do not use it as a backup.
-- Sequence and defined type
CREATE SEQUENCE IF NOT EXISTS todo_items_id_seq;
-- Table Definition
CREATE TABLE "public"."todo_items" (
"id" int4 NOT NULL DEFAULT nextval('todo_items_id_seq'::regclass),
"text" text,
"completed" bool,
"created_at" timestamp,
"points" int2 DEFAULT 0,
"user_id" int4
);
INSERT INTO "public"."todo_items" ("text", "completed", "created_at", "points", "user_id") VALUES
('belajar dan buat latihan html', 't', '2023-08-04 23:23:19.32187', 10, 1);
INSERT INTO "public"."todo_items" ("text", "completed", "created_at", "points", "user_id") VALUES
('kepentingan typescript', 't', '2023-08-04 23:27:19.208151', 5, 1);
INSERT INTO "public"."todo_items" ("text", "completed", "created_at", "points", "user_id") VALUES
('react is a library, not a framework', 'f', '2023-08-04 23:28:13.027514', 80, 1);
INSERT INTO "public"."todo_items" ("text", "completed", "created_at", "points", "user_id") VALUES
('css, scss, sass', 't', '2023-08-04 23:24:11.727592', 2, 1),
('javascript tu tak ada kaitan dengan java', 't', '2023-08-04 23:26:09.445936', 6, 1),
('pengkalan data dan sql', 'f', '2023-08-04 23:28:44.022581', 8, 1),
('fahamkan kepentingan css framework', 'f', '2023-08-04 23:25:26.044758', 12, 1),
('balance sheet', 'f', '2023-08-16 17:32:11.639107', 8, 2),
('perbezaan sdn bhd dan enterprise', 't', '2023-08-16 17:33:11.595628', 20, 2),
('bidang kuasa majlis perbandaran', 'f', '2023-08-16 17:34:39.761695', 10, 2),
('tax structure', 'f', '2023-08-16 17:34:39.761695', 12, 2),
('tax exemption', 't', '2023-08-16 17:40:56.425942', 20, 2),
('money laundering act', 'f', '2023-08-16 17:40:56.425942', 12, 2),
('1st law of newton', 't', '2023-08-16 17:44:55.289304', 8, 3),
('2nd law of newton', 't', '2023-08-16 17:44:55.289304', 3, 3),
('3rd law of newton', 't', '2023-08-16 17:44:55.289304', 8, 3),
('nobel price in 10 years?', 'f', '2023-08-16 17:44:55.289304', 9000, 3),
('replicating superconductor experiment', 'f', '2023-08-16 17:44:55.289304', 100, 3);
DROP TABLE IF EXISTS "public"."users";
-- This script only contains the table creation statements and does not fully represent the table in the database. It's still missing: indices, triggers. Do not use it as a backup.
-- Sequence and defined type
CREATE SEQUENCE IF NOT EXISTS users_id_seq;
-- Table Definition
CREATE TABLE "public"."users" (
"id" int4 NOT NULL DEFAULT nextval('users_id_seq'::regclass),
"name" text NOT NULL
);
INSERT INTO "public"."users" ("name") VALUES
('abu');
INSERT INTO "public"."users" ("name") VALUES
( 'ahmad');
INSERT INTO "public"."users" ("name") VALUES
( 'ali');
INSERT INTO "public"."users" ("name") VALUES
('muhammad');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment