Created
April 20, 2023 17:07
-
-
Save nolleto/a7943f9083b82d2484ad2fb1f9faebe0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Create Tables ------------------------------------------------------- | |
CREATE TABLE employments ( | |
id integer GENERATED ALWAYS AS IDENTITY PRIMARY KEY, | |
name text NOT NULL, | |
department text NOT NULL, | |
salary integer NOT NULL | |
); | |
CREATE UNIQUE INDEX employments_pkey ON employments(id int4_ops); | |
-- Insert rows ------------------------------------------------------- | |
INSERT INTO employments(name, department, salary) | |
VALUES ('João', 'sales', 1000); | |
INSERT INTO employments(name, department, salary) | |
VALUES ('Maria', 'development', 1000); | |
INSERT INTO employments(name, department, salary) | |
VALUES ('Carlos', 'marketing', 1000); | |
INSERT INTO employments(name, department, salary) | |
VALUES ('Chris', 'sales', 2000); | |
INSERT INTO employments(name, department, salary) | |
VALUES ('Marlon', 'sales', 3000); | |
INSERT INTO employments(name, department, salary) | |
VALUES ('Dustin', 'sales', 4000); | |
INSERT INTO employments(name, department, salary) | |
VALUES ('Samuel', 'development', 2000); | |
INSERT INTO employments(name, department, salary) | |
VALUES ('Julia', 'development', 3000); | |
INSERT INTO employments(name, department, salary) | |
VALUES ('Fabio', 'development', 4000); | |
INSERT INTO employments(name, department, salary) | |
VALUES ('Katia', 'marketing', 2000); | |
INSERT INTO employments(name, department, salary) | |
VALUES ('Antonio', 'marketing', 3000); | |
INSERT INTO employments(name, department, salary) | |
VALUES ('Steve', 'marketing', 4000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment