-- create a table
CREATE TABLE EMPLOYEE (
  EMPID integer PRIMARY KEY, 
  NAME text, 
  SUPERVISOR integer, 
  LOCATION text, 
  SALARY integer
);

CREATE TABLE EMPLOYEEBONUS (
  EMPID integer, 
  NBONUS integer
);
-- insert some values
INSERT INTO EMPLOYEE VALUES (34,'Amy', NULL, 'NY',110000);
INSERT INTO EMPLOYEE VALUES (17,'Ben', 34, 'TN',75000);
INSERT INTO EMPLOYEE VALUES (5,'Chris',34, 'TN',80000);
INSERT INTO EMPLOYEE VALUES (10,'Don', 5, 'HI',100000);

INSERT INTO EMPLOYEEBONUS VALUES (17,5000);
INSERT INTO EMPLOYEEBONUS VALUES (10,2000);
INSERT INTO EMPLOYEEBONUS VALUES (34,5000);

-- fetch some values
SELECT a.NAME, a.SUPERVISOR, b.NBONUS
FROM EMPLOYEE a
JOIN EMPLOYEEBONUS b
ON a.EMPID = b.EMPID
WHERE b.NBONUS > 1000;