CREATE TABLE departments (
    department_id int,
    department_name varchar(100) not null,
    department_location varchar(200) not null,
    primary key (department_id)
)

INSERT INTO departments (department_id, department_name, department_location) VALUES 
(10, 'PROGRAMMING', 'NEW YORK'),
(20, 'RESEARCH', 'DALLAS'),
(30, 'SALES', 'CHICAGO'),
(40,'OPERATIONS','BOSTON')

SELECT * FROM departments;

/*
employees
========
employee_id
employee_name
job
hire_date,
salary,
commission
department_id
manager_id
*/

CREATE TABLE employees (
    employee_id int, 
    employee_name varchar(100) not null,
    job varchar(100) not null,
    hire_date date not null,
    salary int not null,
    commission int,
    department_id int not null,
    manager_id int,
    primary key (employee_id)
)

SELECT * FROM employees;

INSERT INTO employees (employee_id, employee_name, job, hire_date, salary, commission, department_id, manager_id) VALUES 
(1,'SMITH','ADMIN','2019-12-15',1000,NULL,20,13),
(2,'ALLEN','SALESMAN','2020-04-20',1800,400,30,6),
(3,'WARD','SALESMAN','2020-04-22',1450,500,30,6),
(4,'JONES','MANAGER','2020-04-02',2975,NULL,20,9),
(5,'MARTIN','SALESMAN','2020-08-28',1450,1500,30,6),
(6,'BLAKE','MANAGER','2020-05-01',3000,NULL,30,9),
(7,'CLARK','MANAGER','2020-06-09',2650,NULL,10,9),
(8,'SCOTT','ANALYST','2021-12-09',3200,NULL,20,4),
(9,'KING','CEO','2020-11-16',5200,NULL,10,NULL),
(10,'TURNER','SALESMAN','2020-09-08',1700,NULL,30,6),
(11,'ADAMS','ADMIN','2022-01-12',1400,NULL,20,8),
(12,'JAMES','ADMIN','2020-12-04',960,NULL,30,6),
(13,'FORD','ANALYST','2020-12-04',3000,NULL,20,4),
(14,'MILLER','ADMIN','2021-01-23',1500,NULL,10,7)