Skip to content

Instantly share code, notes, and snippets.

@LiorB-D
Last active September 25, 2024 14:34
Show Gist options
  • Save LiorB-D/fe0223ec26e1992ce32cb67d6f9692a6 to your computer and use it in GitHub Desktop.
Save LiorB-D/fe0223ec26e1992ce32cb67d6f9692a6 to your computer and use it in GitHub Desktop.
CREATE TABLE employees (
employee_id SERIAL PRIMARY KEY,
name VARCHAR(100),
email VARCHAR(100),
salary DECIMAL(10, 2),
bonus DECIMAL(10, 2),
department VARCHAR(50)
);
-- Insert data into employees
INSERT INTO employees (employee_id, name, email, salary, bonus, department) VALUES
(1, 'Alice', '[email protected]', 60000.00, NULL, 'HR'),
(2, 'Bob', NULL, 50000.00, 5000.00, 'Engineering'),
(3, 'Charlie', '[email protected]', NULL, NULL, 'Sales'),
(4, 'David', '[email protected]', 70000.00, 3000.00, NULL),
(5, 'Eve', '', 80000.00, 8000.00, 'HR'),
(6, 'Frank', NULL, NULL, 2000.00, 'Marketing'),
(7, 'Grace', '[email protected]', 55000.00, NULL, 'Sales'),
(8, 'Hank', '[email protected]', NULL, NULL, 'Marketing');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment