Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE "teste" (
- "id" int8 DEFAULT nextval('teste_id_seq'::regclass) NOT NULL,
- "start_date" timestamp(6),
- "end_date" timestamp(6),
- CONSTRAINT "teste_pkey" PRIMARY KEY ("id")
- )
- INSERT INTO "teste" VALUES ('2019-3-17 17:38:23', '2019-3-18 17:40:00');
- INSERT INTO "teste" VALUES ('2019-3-17 17:20:00', '2019-3-17 18:39:07');
- select end_date-start_date from teste;
- select sum(end_date-start_date) from teste;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement