set DATESTYLE to "DMY";

-- Таблица EMPLOYEE - сотрудники фирмы --
CREATE TABLE EMPLOYEE (
  employee_id SMALLINT NOT NULL PRIMARY KEY,    -- Код сотрудника
  last_name VARCHAR(15),    -- Фамилия
  first_name VARCHAR(15),   -- Имя
  middle_initial VARCHAR(1),    -- Средний инициал
  manager_id SMALLINT,  -- Код начальника
  job_id SMALLINT,  -- Код должности
  hire_date TIMESTAMP,  -- Дата поступления в фирму
  salary NUMERIC(7,2),  -- Зарплата
  commission NUMERIC(7,2),  -- Комиссионные
  department_id SMALLINT  );    -- Код отдела

-- Таблица DEPARTMENT - отделы фирмы --
CREATE TABLE DEPARTMENT (
  department_id SMALLINT NOT NULL PRIMARY KEY,  -- Код отдела
  name VARCHAR(14), -- Название отдела
  location_id SMALLINT );   -- Код места размещения

-- Таблица LOCATION - места размещения отделов --
CREATE TABLE LOCATION (
  location_id SMALLINT NOT NULL PRIMARY KEY,    -- Код места размещения
  regional_group VARCHAR(20) ); -- Город

-- Таблица JOB - должности в фирме --
CREATE TABLE JOB  (
  job_id SMALLINT NOT NULL PRIMARY KEY, -- Код должности
  "function" VARCHAR(30) ); -- Название должности

-- Таблица CUSTOMER - фирмы-покупатели --
CREATE TABLE CUSTOMER (
  customer_id INTEGER NOT NULL PRIMARY KEY, -- Код покупателя
  name VARCHAR(45), -- Название покупателя
  address VARCHAR(40),  -- Адрес
  city VARCHAR(30), -- Город
  state VARCHAR(2), -- Штат
  zip_code VARCHAR(9),  -- Почтовый код
  area_code SMALLINT,   -- Код региона
  phone_number INTEGER, -- Телефон
  salesperson_id SMALLINT,  -- Код сотрудника-продавца, обслуживаю-щего данного покупателя
  credit_limit NUMERIC(9,2),    -- Кредит для покупателя
  comments VARCHAR(500) );  -- Примечания

-- Таблица SALES_ORDER - договоры о продаже --
CREATE TABLE SALES_ORDER (
  order_id SMALLINT NOT NULL PRIMARY KEY,   -- Код договора
  order_date DATE,  -- Дата договора
  customer_id INTEGER,  -- Код покупателя
  ship_date DATE,   -- Дата поставки
  total NUMERIC(8,2) ); -- Общая сумма договора

-- Таблица ITEM - акты продаж --
CREATE TABLE ITEM (
  order_id SMALLINT NOT NULL,   -- Код договора, в состав которого входит акт
  item_id SMALLINT NOT NULL,    -- Код акта
  product_id INTEGER,   -- Код продукта
  actual_price NUMERIC(8,2),    -- Цена продажи
  quantity INTEGER, -- Количество
  total NUMERIC(8,2),   -- Общая сумма
PRIMARY KEY (order_id,item_id)
);

-- Таблица PRODUCT - товары --
CREATE TABLE PRODUCT (
  product_id INTEGER NOT NULL PRIMARY KEY,  -- Код продукта
  description VARCHAR(30) );    -- Название продукта

-- Таблица PRICE - цены --
CREATE TABLE PRICE (
  product_id INTEGER NOT NULL,  -- Код продукта
  list_price NUMERIC(8,2),  -- Объявленная цена
  min_price NUMERIC(8,2),   -- Минимально возможная цена
  start_date DATE NOT NULL, -- Дата установления цены
  end_date DATE,    -- Дата отмены цены
  PRIMARY KEY (product_id,start_date)
);

INSERT INTO customer VALUES(100,'JOCKSPORTS','345 VIEWRIDGE','BELMONT','CA','96711',415,5986609,7844,5000,'Very friendly people to work with -- sales rep likes to be called Mike.');
INSERT INTO customer VALUES(101,'TKB SPORT SHOP','490 BOLI RD.','REDWOOD CITY','CA','94061',415,3681223,7521,10000,'Rep called 5/8 about change in order - contact shipping.');
INSERT INTO customer VALUES(102,'VOLLYRITE','9722 HAMILTON','BURLINGAME','CA','95133',415,6443341,7654,7000,'Company doing heavy promotion beginning 10/89. Prepare for large orders during w');
INSERT INTO customer VALUES(103,'JUST TENNIS','HILLVIEW MALL','BURLINGAME','CA','97544',415,6779312,7521,3000,'Contact rep about new line of tennis rackets.');
INSERT INTO customer VALUES(104,'EVERY MOUNTAIN','574 SURRY RD.','CUPERTINO','CA','93301',408,9962323,7499,10000,'Customer with high market share (23%) due to aggressive advertising.');
INSERT INTO customer VALUES(105,'K + T SPORTS','3476 EL PASEO','SANTA CLARA','CA','91003',408,3769966,7844,5000,'Tends to order large amounts of merchandise at once. Accounting is considering r');
INSERT INTO customer VALUES(106,'SHAPE UP','908 SEQUOIA','PALO ALTO','CA','94301',415,3649777,7521,6000,'Support intensive. Orders small amounts (< 800) of merchandise at a time.');
INSERT INTO customer VALUES(107,'WOMENS SPORTS','VALCO VILLAGE','SUNNYVALE','CA','93301',408,9674398,7499,10000,'First sporting goods store geared exclusively towards women. Unusual promotional');
INSERT INTO customer VALUES(108,'NORTH WOODS HEALTH AND FITNESS SUPPLY CENTER','98 LONE PINE WAY','HIBBING','MN','55649',612,5669123,7844,8000,'');
INSERT INTO customer VALUES(201,'STADIUM SPORTS','47 IRVING PL.','NEW YORK','NY','10003',212,5555335,7557,10000,'Large general-purpose sports store with an affluent customer base.');
INSERT INTO customer VALUES(202,'HOOPS','2345 ADAMS AVE.','LEICESTER','MA','01524',508,5557542,7820,5000,'Specializes in basketball equipment.');
INSERT INTO customer VALUES(203,'REBOUND SPORTS','2 E. 14TH ST.','NEW YORK','NY','10009',212,5555989,7557,10000,'Follow up on the promotion proposal.');
INSERT INTO customer VALUES(204,'THE POWER FORWARD','1 KNOTS LANDING','DALLAS','TX','75248',214,5550505,7560,12000,'Large floorspace.  Prefers maintaining large amounts of inventory on hand.');
INSERT INTO customer VALUES(205,'POINT GUARD','20 THURSTON ST.','YONKERS','NY','10956',914,5554766,7557,3000,'Tremendous potential for an exclusive agreement.');
INSERT INTO customer VALUES(206,'THE COLISEUM','5678 WILBUR PL.','SCARSDALE','NY','10583',914,5550217,7557,6000,'Contact rep. about new product lines.');
INSERT INTO customer VALUES(207,'FAST BREAK','1000 HERBERT LN.','CONCORD','MA','01742',508,5551298,7820,7000,'Customer requires written price quotes before making purchase requisitions.');
INSERT INTO customer VALUES(208,'AL AND BOB''S SPORTS','260 YORKTOWN CT.','AUSTIN','TX','78731',512,5557631,7560,4000,'Very personal purchasing agents -- Sharon and Scott.');
INSERT INTO customer VALUES(211,'AT BAT','234 BEACHEM ST.','BROOKLINE','MA','02146',617,5557385,7820,8000,'Have an open purchase order for $3000.  Ship immediately on request.');
INSERT INTO customer VALUES(212,'ALL SPORT','1000 38TH ST.','BROOKLYN','NY','11210',718,5551739,7600,6000,'Pursue a contract -- possible candidate for volume purchasing agreements.');
INSERT INTO customer VALUES(213,'GOOD SPORT','400 46TH ST.','SUNNYSIDE','NY','11104',718,5553771,7600,5000,'May be moving to a larger location.');
INSERT INTO customer VALUES(214,'AL''S PRO SHOP','45 SPRUCE ST.','SPRING','TX','77388',713,5555172,7564,8000,'Target market is serious athletes.');
INSERT INTO customer VALUES(215,'BOB''S FAMILY SPORTS','400 E. 23RD','HOUSTON','TX','77026',713,5558015,7654,8000,'Target market is casual and weekend athletes.  Offers a large selection.');
INSERT INTO customer VALUES(216,'THE ALL AMERICAN','547 PRENTICE RD.','CHELSEA','MA','02150',617,5553047,7820,5000,'Customer prefers to be called between 10 and 12.');
INSERT INTO customer VALUES(217,'HIT, THROW, AND RUN','333 WOOD COURT','GRAPEVINE','TX','76051',817,5552352,7564,6000,'General purpose sports store.');
INSERT INTO customer VALUES(218,'THE OUTFIELD','346 GARDEN BLVD.','FLUSHING','NY','11355',718,5552131,7820,4000,'Store does not open until 11am and does not have an answering service.');
INSERT INTO customer VALUES(221,'WHEELS AND DEALS','2 MEMORIAL DRIVE','HOUSTON','TX','77007',713,5554139,7789,10000,'Discount bicycle and sporting good store.');
INSERT INTO customer VALUES(222,'JUST BIKES','4000 PARKRIDGE BLVD.','DALLAS','TX','75205',214,5558735,7789,4000,'Exclusive bicycle dealer.');
INSERT INTO customer VALUES(223,'VELO SPORTS','23 WHITE ST.','MALDEN','MA','02148',617,5554983,7820,5000,'Clerk answers all phone lines.  Ask for Mike.');
INSERT INTO customer VALUES(224,'JOE''S BIKE SHOP','4500 FOX COURT','GRAND PRARIE','TX','75051',214,5559834,7789,6000,'Call Joe to make sure last shipment was complete.');
INSERT INTO customer VALUES(225,'BOB''S SWIM, CYCLE, AND RUN','300 HORSECREEK CIRCLE','IRVING','TX','75039',214,5558388,7789,7000,'Store catering to triathletes.');
INSERT INTO customer VALUES(226,'CENTURY SHOP','8 DAGMAR DR.','HUNTINGTON','NY','11743',516,5553006,7555,4000,'Customer in the midst of a cost-cutting program.');
INSERT INTO customer VALUES(227,'THE TOUR','2500 GARDNER RD.','SOMERVILLE','MA','02144',617,5556673,7820,5000,'Customer referred to us by The All American.');
INSERT INTO customer VALUES(228,'FITNESS FIRST','5000 85TH ST.','JACKSON HEIGHTS','NY','11372',718,5558710,7555,4000,'Recently acquired another sporting goods store.  Expect higher volume in the fut');

INSERT INTO department VALUES(10,'ACCOUNTING',122);
INSERT INTO department VALUES(20,'RESEARCH',124);
INSERT INTO department VALUES(30,'SALES',123);
INSERT INTO department VALUES(40,'OPERATIONS',167);
INSERT INTO department VALUES(12,'RESEARCH',122);
INSERT INTO department VALUES(13,'SALES',122);
INSERT INTO department VALUES(14,'OPERATIONS',122);
INSERT INTO department VALUES(23,'SALES',124);
INSERT INTO department VALUES(24,'OPERATIONS',124);
INSERT INTO department VALUES(34,'OPERATIONS',123);
INSERT INTO department VALUES(43,'SALES',167);

INSERT INTO employee (EMPLOYEE_ID,LAST_NAME,FIRST_NAME,MIDDLE_INITIAL,JOB_ID,MANAGER_ID,HIRE_DATE,SALARY,DEPARTMENT_ID) VALUES(7369,'SMITH','JOHN','Q',667,7902,'17/12/1984',800,20);
INSERT INTO employee VALUES(7499,'ALLEN','KEVIN','J',7698,670,'20/02/1985',1600,300,30);
INSERT INTO employee (EMPLOYEE_ID,LAST_NAME,FIRST_NAME,MIDDLE_INITIAL,JOB_ID,MANAGER_ID,HIRE_DATE,SALARY,DEPARTMENT_ID) VALUES(7505,'DOYLE','JEAN','K',671,7839,'04/04/1985',2850,13);
INSERT INTO employee (EMPLOYEE_ID,LAST_NAME,FIRST_NAME,MIDDLE_INITIAL,JOB_ID,MANAGER_ID,HIRE_DATE,SALARY,DEPARTMENT_ID) VALUES(7506,'DENNIS','LYNN','S',671,7839,'15/05/1985',2750,23);
INSERT INTO employee (EMPLOYEE_ID,LAST_NAME,FIRST_NAME,MIDDLE_INITIAL,JOB_ID,MANAGER_ID,HIRE_DATE,SALARY,DEPARTMENT_ID) VALUES(7507,'BAKER','LESLIE','D',671,7839,'10/06/1985',2200,14);
INSERT INTO employee VALUES(7521,'WARD','CYNTHIA','D',7698,670,'22/02/1985',1250,500,30);
INSERT INTO employee VALUES(7555,'PETERS','DANIEL','T',7505,670,'31/03/1985',1250,300,13);
INSERT INTO employee VALUES(7557,'SHAW','KAREN','P',7505,670,'02/04/1985',1250,1200,13);
INSERT INTO employee (EMPLOYEE_ID,LAST_NAME,FIRST_NAME,MIDDLE_INITIAL,JOB_ID,MANAGER_ID,HIRE_DATE,SALARY,DEPARTMENT_ID) VALUES(7560,'DUNCAN','SARAH','S',670,7506,'31/05/1985',1250,23);
INSERT INTO employee VALUES(7564,'LANGE','GREGORY','J',7506,670,'01/06/1985',1250,300,23);
INSERT INTO employee (EMPLOYEE_ID,LAST_NAME,FIRST_NAME,MIDDLE_INITIAL,JOB_ID,MANAGER_ID,HIRE_DATE,SALARY,DEPARTMENT_ID) VALUES(7566,'JONES','TERRY','M',671,7839,'02/04/1985',2975,20);
INSERT INTO employee (EMPLOYEE_ID,LAST_NAME,FIRST_NAME,MIDDLE_INITIAL,JOB_ID,MANAGER_ID,HIRE_DATE,SALARY,DEPARTMENT_ID) VALUES(7569,'ALBERTS','CHRIS','L',671,7839,'06/04/1985',3000,12);
INSERT INTO employee VALUES(7600,'PORTER','RAYMOND','Y',7505,670,'15/04/1985',1250,900,13);
INSERT INTO employee (EMPLOYEE_ID,LAST_NAME,FIRST_NAME,MIDDLE_INITIAL,JOB_ID,MANAGER_ID,HIRE_DATE,SALARY,DEPARTMENT_ID) VALUES(7609,'LEWIS','RICHARD','M',668,7507,'16/04/1985',1800,24);
INSERT INTO employee VALUES(7654,'MARTIN','KENNETH','J',7698,670,'28/09/1985',1250,1400,30);
INSERT INTO employee (EMPLOYEE_ID,LAST_NAME,FIRST_NAME,MIDDLE_INITIAL,JOB_ID,MANAGER_ID,HIRE_DATE,SALARY,DEPARTMENT_ID) VALUES(7676,'SOMMERS','DENISE','D',668,7507,'19/04/1985',1850,34);
INSERT INTO employee (EMPLOYEE_ID,LAST_NAME,FIRST_NAME,MIDDLE_INITIAL,JOB_ID,MANAGER_ID,HIRE_DATE,SALARY,DEPARTMENT_ID) VALUES(7698,'BLAKE','MARION','S',671,7839,'01/05/1985',2850,30);
INSERT INTO employee (EMPLOYEE_ID,LAST_NAME,FIRST_NAME,MIDDLE_INITIAL,JOB_ID,MANAGER_ID,HIRE_DATE,SALARY,DEPARTMENT_ID) VALUES(7782,'CLARK','CAROL','F',671,7839,'09/06/1985',2450,10);
INSERT INTO employee (EMPLOYEE_ID,LAST_NAME,FIRST_NAME,MIDDLE_INITIAL,JOB_ID,MANAGER_ID,HIRE_DATE,SALARY,DEPARTMENT_ID) VALUES(7788,'SCOTT','DONALD','T',669,7566,'09/12/1986',3000,20);
INSERT INTO employee VALUES(7789,'WEST','LIVIA','N',7506,670,'04/04/1985',1500,1000,23);
INSERT INTO employee (EMPLOYEE_ID,LAST_NAME,FIRST_NAME,MIDDLE_INITIAL,JOB_ID,MANAGER_ID,HIRE_DATE,SALARY,DEPARTMENT_ID) VALUES(7799,'FISHER','MATTHEW','G',669,7569,'12/12/1986',3000,12);
INSERT INTO employee VALUES(7820,'ROSS','PAUL','S',7505,670,'01/06/1985',1300,800,43);
INSERT INTO employee (EMPLOYEE_ID,LAST_NAME,FIRST_NAME,MIDDLE_INITIAL,JOB_ID,HIRE_DATE,SALARY,DEPARTMENT_ID) VALUES(7839,'KING','FRANCIS','A',672,'17/11/1985',5000,10);
INSERT INTO employee VALUES(7844,'TURNER','MARY','A',7698,670,'08/09/1985',1500,0,30);
INSERT INTO employee (EMPLOYEE_ID,LAST_NAME,FIRST_NAME,MIDDLE_INITIAL,JOB_ID,MANAGER_ID,HIRE_DATE,SALARY,DEPARTMENT_ID) VALUES(7876,'ADAMS','DIANE','G',667,7788,'12/01/1987',1100,20);
INSERT INTO employee (EMPLOYEE_ID,LAST_NAME,FIRST_NAME,MIDDLE_INITIAL,JOB_ID,MANAGER_ID,HIRE_DATE,SALARY,DEPARTMENT_ID) VALUES(7900,'JAMES','FRED','S',667,7698,'03/12/1985',950,30);
INSERT INTO employee (EMPLOYEE_ID,LAST_NAME,FIRST_NAME,MIDDLE_INITIAL,JOB_ID,MANAGER_ID,HIRE_DATE,SALARY,DEPARTMENT_ID) VALUES(7902,'FORD','JENNIFER','D',669,7566,'03/12/1985',3000,20);
INSERT INTO employee (EMPLOYEE_ID,LAST_NAME,FIRST_NAME,MIDDLE_INITIAL,JOB_ID,MANAGER_ID,HIRE_DATE,SALARY,DEPARTMENT_ID) VALUES(7916,'ROBERTS','GRACE','M',669,7569,'04/01/1987',2875,12);
INSERT INTO employee (EMPLOYEE_ID,LAST_NAME,FIRST_NAME,MIDDLE_INITIAL,JOB_ID,MANAGER_ID,HIRE_DATE,SALARY,DEPARTMENT_ID) VALUES(7919,'DOUGLAS','MICHAEL','A',667,7799,'04/01/1987',800,12);
INSERT INTO employee (EMPLOYEE_ID,LAST_NAME,FIRST_NAME,MIDDLE_INITIAL,JOB_ID,MANAGER_ID,HIRE_DATE,SALARY,DEPARTMENT_ID) VALUES(7934,'MILLER','BARBARA','M',667,7782,'23/01/1986',1300,10);
INSERT INTO employee (EMPLOYEE_ID,LAST_NAME,FIRST_NAME,MIDDLE_INITIAL,JOB_ID,MANAGER_ID,HIRE_DATE,SALARY,DEPARTMENT_ID) VALUES(7950,'JENSEN','ALICE','B',667,7505,'15/01/1987',750,13);
INSERT INTO employee (EMPLOYEE_ID,LAST_NAME,FIRST_NAME,MIDDLE_INITIAL,JOB_ID,MANAGER_ID,HIRE_DATE,SALARY,DEPARTMENT_ID) VALUES(7954,'MURRAY','JAMES','T',667,7506,'16/01/1987',750,23);

INSERT INTO item VALUES(600,1,100861,42,1,42);
INSERT INTO item VALUES(610,3,100890,58,1,58);
INSERT INTO item VALUES(611,1,100861,45,1,45);
INSERT INTO item VALUES(612,1,100860,30,100,3000);
INSERT INTO item VALUES(601,1,200376,2.4,12,28.8);
INSERT INTO item VALUES(601,2,100860,32,1,32);
INSERT INTO item VALUES(602,1,100870,2.8,20,56);
INSERT INTO item VALUES(604,1,100890,58,3,174);
INSERT INTO item VALUES(604,2,100861,42,2,84);
INSERT INTO item VALUES(604,3,100860,32,12,384);
INSERT INTO item VALUES(603,1,100860,32,7,224);
INSERT INTO item VALUES(610,1,100860,35,1,35);
INSERT INTO item VALUES(610,2,100870,2.8,3,8.4);
INSERT INTO item VALUES(613,4,200376,2.2,200,440);
INSERT INTO item VALUES(614,1,100860,35,444,15540);
INSERT INTO item VALUES(614,2,100870,2.8,1000,2800);
INSERT INTO item VALUES(612,2,100861,40.5,20,810);
INSERT INTO item VALUES(612,3,101863,10,150,1500);
INSERT INTO item VALUES(620,1,100860,35,10,350);
INSERT INTO item VALUES(620,2,200376,2.4,1000,2400);
INSERT INTO item VALUES(620,3,102130,3.4,500,1700);
INSERT INTO item VALUES(613,1,100871,5.6,100,560);
INSERT INTO item VALUES(613,2,101860,24,200,4800);
INSERT INTO item VALUES(613,3,200380,4,150,600);
INSERT INTO item VALUES(619,3,102130,3.4,100,340);
INSERT INTO item VALUES(617,1,100860,35,50,1750);
INSERT INTO item VALUES(617,2,100861,45,100,4500);
INSERT INTO item VALUES(614,3,100871,5.6,1000,5600);
INSERT INTO item VALUES(616,1,100861,45,10,450);
INSERT INTO item VALUES(616,2,100870,2.8,50,140);
INSERT INTO item VALUES(616,3,100890,58,2,116);
INSERT INTO item VALUES(616,4,102130,3.4,10,34);
INSERT INTO item VALUES(616,5,200376,2.4,10,24);
INSERT INTO item VALUES(619,1,200380,4,100,400);
INSERT INTO item VALUES(619,2,200376,2.4,100,240);
INSERT INTO item VALUES(615,1,100861,45,4,180);
INSERT INTO item VALUES(607,1,100871,5.6,1,5.6);
INSERT INTO item VALUES(615,2,100870,2.8,100,280);
INSERT INTO item VALUES(617,3,100870,2.8,500,1400);
INSERT INTO item VALUES(617,4,100871,5.6,500,2800);
INSERT INTO item VALUES(617,5,100890,58,500,29000);
INSERT INTO item VALUES(617,6,101860,24,100,2400);
INSERT INTO item VALUES(617,7,101863,12.5,200,2500);
INSERT INTO item VALUES(617,8,102130,3.4,100,340);
INSERT INTO item VALUES(617,9,200376,2.4,200,480);
INSERT INTO item VALUES(617,10,200380,4,300,1200);
INSERT INTO item VALUES(609,2,100870,2.5,5,12.5);
INSERT INTO item VALUES(609,3,100890,50,1,50);
INSERT INTO item VALUES(618,1,100860,35,23,805);
INSERT INTO item VALUES(618,2,100861,45,50,2250);
INSERT INTO item VALUES(618,3,100870,2.8,10,28);
INSERT INTO item VALUES(621,1,100861,45,10,450);
INSERT INTO item VALUES(621,2,100870,2.8,100,280);
INSERT INTO item VALUES(615,3,100871,5,50,250);
INSERT INTO item VALUES(608,1,101860,24,1,24);
INSERT INTO item VALUES(608,2,100871,5.6,2,11.2);
INSERT INTO item VALUES(609,1,100861,40,1,40);
INSERT INTO item VALUES(606,1,102130,3.4,1,3.4);
INSERT INTO item VALUES(605,1,100861,45,100,4500);
INSERT INTO item VALUES(605,2,100870,2.8,500,1400);
INSERT INTO item VALUES(605,3,100890,58,5,290);
INSERT INTO item VALUES(605,4,101860,24,50,1200);
INSERT INTO item VALUES(605,5,101863,9.5,100,950);
INSERT INTO item VALUES(605,6,102130,3.4,10,34);
INSERT INTO item VALUES(612,4,100871,5.5,100,550);
INSERT INTO item VALUES(619,4,100871,5.6,50,280);
INSERT INTO item VALUES(509,1,105123,35,30,1050);
INSERT INTO item VALUES(509,2,105124,9,10,90);
INSERT INTO item VALUES(509,3,102136,3.4,10,34);
INSERT INTO item VALUES(523,1,102136,3.4,10,34);
INSERT INTO item VALUES(523,2,105123,37.7,30,1131);
INSERT INTO item VALUES(549,1,105123,38,5,190);
INSERT INTO item VALUES(549,2,105127,6,30,180);
INSERT INTO item VALUES(549,3,105125,3,200,600);
INSERT INTO item VALUES(549,4,105124,13,50,650);
INSERT INTO item VALUES(507,1,105123,35.3,20,706);
INSERT INTO item VALUES(507,2,105124,9,20,180);
INSERT INTO item VALUES(516,1,105124,9,60,540);
INSERT INTO item VALUES(516,2,102136,3.2,250,800);
INSERT INTO item VALUES(516,3,105125,1.9,250,475);
INSERT INTO item VALUES(553,1,105127,6,500,3000);
INSERT INTO item VALUES(553,2,200376,1.75,800,1400);
INSERT INTO item VALUES(526,1,105123,32,100,3200);
INSERT INTO item VALUES(526,2,105124,9,500,4500);
INSERT INTO item VALUES(543,1,105123,34,100,3400);
INSERT INTO item VALUES(543,2,105124,10,500,5000);
INSERT INTO item VALUES(555,1,105123,34,100,3400);
INSERT INTO item VALUES(555,2,105124,10,500,5000);
INSERT INTO item VALUES(555,3,102136,2.8,50,140);
INSERT INTO item VALUES(559,1,105123,40,5,200);
INSERT INTO item VALUES(559,2,105124,15,5,75);
INSERT INTO item VALUES(559,3,105127,6,5,30);
INSERT INTO item VALUES(559,4,102136,3.4,3,10.2);
INSERT INTO item VALUES(559,5,200376,2.4,30,72);
INSERT INTO item VALUES(528,1,105123,37.7,100,3770);
INSERT INTO item VALUES(531,1,105124,11,100,1100);
INSERT INTO item VALUES(531,2,102136,3,100,300);
INSERT INTO item VALUES(558,1,105124,14,100,1400);
INSERT INTO item VALUES(558,2,102136,3,100,300);
INSERT INTO item VALUES(525,1,105123,37.7,10,377);
INSERT INTO item VALUES(552,1,105123,40,10,400);
INSERT INTO item VALUES(552,2,105124,15,10,150);
INSERT INTO item VALUES(552,3,102136,3.4,1,3.4);
INSERT INTO item VALUES(552,4,200376,2.4,1,2.4);
INSERT INTO item VALUES(556,1,102136,3.4,25,85);
INSERT INTO item VALUES(560,1,200376,2.4,30,72);
INSERT INTO item VALUES(565,1,105123,37,100,3700);
INSERT INTO item VALUES(565,2,105124,12,100,1200);
INSERT INTO item VALUES(574,1,104350,41.8,25,1045);
INSERT INTO item VALUES(574,2,200380,3.2,200,640);
INSERT INTO item VALUES(576,1,104350,44,10,440);
INSERT INTO item VALUES(576,2,104351,26,10,260);
INSERT INTO item VALUES(576,3,104362,4.25,170,722.5);
INSERT INTO item VALUES(576,4,200376,2.16,90,194.4);
INSERT INTO item VALUES(576,5,200380,3.4,130,442);
INSERT INTO item VALUES(503,1,104350,38,30,1140);
INSERT INTO item VALUES(503,2,104351,23.6,10,236);
INSERT INTO item VALUES(503,3,104352,50,10,500);
INSERT INTO item VALUES(518,1,104350,38,25,950);
INSERT INTO item VALUES(518,2,104351,23.6,20,472);
INSERT INTO item VALUES(518,3,104360,36,20,720);
INSERT INTO item VALUES(518,4,104362,4.25,170,722.5);
INSERT INTO item VALUES(518,5,102134,3.4,20,68);
INSERT INTO item VALUES(517,1,104352,50,15,750);
INSERT INTO item VALUES(517,2,102134,3.4,10,34);
INSERT INTO item VALUES(544,1,104350,44,15,660);
INSERT INTO item VALUES(544,2,104351,26,15,390);
INSERT INTO item VALUES(544,3,104352,58.3,10,583);
INSERT INTO item VALUES(544,4,104361,50,10,500);
INSERT INTO item VALUES(544,5,104362,4.5,50,225);
INSERT INTO item VALUES(524,1,104350,42,10,420);
INSERT INTO item VALUES(524,2,104351,23.56,35,824.6);
INSERT INTO item VALUES(524,3,104362,4.25,150,637.5);
INSERT INTO item VALUES(524,4,102134,3.23,30,96.9);
INSERT INTO item VALUES(502,1,104352,50,10,500);
INSERT INTO item VALUES(539,1,104351,26,20,520);
INSERT INTO item VALUES(539,2,104360,39,20,780);
INSERT INTO item VALUES(511,1,104351,23.6,15,354);
INSERT INTO item VALUES(511,2,104362,4.5,50,225);
INSERT INTO item VALUES(511,3,102134,3.4,20,68);
INSERT INTO item VALUES(512,1,104360,36,10,360);
INSERT INTO item VALUES(512,2,102134,3.4,20,68);
INSERT INTO item VALUES(562,1,104351,24.7,25,617.5);
INSERT INTO item VALUES(562,2,104352,58.3,15,874.5);
INSERT INTO item VALUES(562,3,104362,4.25,130,552.5);
INSERT INTO item VALUES(529,1,104350,39.89,30,1196.7);
INSERT INTO item VALUES(529,2,102134,3.4,20,68);
INSERT INTO item VALUES(563,1,104352,58.3,10,583);
INSERT INTO item VALUES(563,2,200376,2.04,150,306);
INSERT INTO item VALUES(568,1,104351,24.7,30,741);
INSERT INTO item VALUES(568,2,200376,2.04,110,224.4);
INSERT INTO item VALUES(568,3,200380,3.6,70,252);
INSERT INTO item VALUES(504,1,104350,40,10,400);
INSERT INTO item VALUES(504,2,104351,22.42,35,784.7);
INSERT INTO item VALUES(504,3,104352,50,5,250);
INSERT INTO item VALUES(538,1,104351,24.7,30,741);
INSERT INTO item VALUES(535,1,104352,54,15,810);
INSERT INTO item VALUES(578,1,104350,41.8,40,1672);
INSERT INTO item VALUES(578,2,200376,2.04,190,387.6);
INSERT INTO item VALUES(578,3,200380,3.6,60,216);
INSERT INTO item VALUES(534,1,104350,42,10,420);
INSERT INTO item VALUES(536,1,104350,39.89,40,1595.6);
INSERT INTO item VALUES(536,2,104352,54,10,540);
INSERT INTO item VALUES(572,1,104351,24.7,25,617.5);
INSERT INTO item VALUES(572,2,104352,58.3,10,583);
INSERT INTO item VALUES(514,1,104350,38,30,1140);
INSERT INTO item VALUES(521,1,104350,40,20,800);
INSERT INTO item VALUES(521,2,102134,3.23,30,96.9);
INSERT INTO item VALUES(551,1,104350,44,10,440);
INSERT INTO item VALUES(551,2,104361,50,5,250);
INSERT INTO item VALUES(551,3,102134,3.4,20,68);
INSERT INTO item VALUES(551,4,200376,1.92,200,384);
INSERT INTO item VALUES(513,1,104350,40,15,600);
INSERT INTO item VALUES(513,2,104351,23.6,20,472);
INSERT INTO item VALUES(513,3,104362,4.25,100,425);
INSERT INTO item VALUES(508,1,104360,36,20,720);
INSERT INTO item VALUES(508,2,104362,4.5,80,360);
INSERT INTO item VALUES(515,1,104350,40,20,800);
INSERT INTO item VALUES(515,2,104351,22.42,25,560.5);
INSERT INTO item VALUES(515,3,102134,3.4,20,68);
INSERT INTO item VALUES(542,1,104350,41.8,25,1045);
INSERT INTO item VALUES(542,2,104360,39,20,780);
INSERT INTO item VALUES(542,3,104361,50,11,550);
INSERT INTO item VALUES(542,4,102134,3.4,10,34);
INSERT INTO item VALUES(573,1,103120,22.5,50,1125);
INSERT INTO item VALUES(573,2,103131,4.04,50,202);
INSERT INTO item VALUES(573,3,103141,20,15,300);
INSERT INTO item VALUES(566,1,103120,23.75,40,950);
INSERT INTO item VALUES(566,2,103121,27,50,1350);
INSERT INTO item VALUES(566,3,103130,3.77,60,226.2);
INSERT INTO item VALUES(566,4,103131,3.9,170,663);
INSERT INTO item VALUES(566,5,103141,20,10,200);
INSERT INTO item VALUES(520,1,103130,4,10,40);
INSERT INTO item VALUES(520,2,103131,3.77,80,301.6);
INSERT INTO item VALUES(519,1,103130,3.5,110,385);
INSERT INTO item VALUES(519,2,103140,19,30,570);
INSERT INTO item VALUES(575,1,103140,19,30,570);
INSERT INTO item VALUES(575,2,200380,3.8,30,114);
INSERT INTO item VALUES(547,1,103130,3.77,80,301.6);
INSERT INTO item VALUES(547,2,103131,4.04,70,282.8);
INSERT INTO item VALUES(547,3,103140,20,15,300);
INSERT INTO item VALUES(547,4,103141,20,5,100);
INSERT INTO item VALUES(540,1,103130,3.98,40,159.2);
INSERT INTO item VALUES(540,2,103131,3.9,180,702);
INSERT INTO item VALUES(567,1,103140,20,10,200);
INSERT INTO item VALUES(570,1,103131,4.04,90,363.6);
INSERT INTO item VALUES(570,2,103140,20,15,300);
INSERT INTO item VALUES(571,1,103131,4.04,70,282.8);
INSERT INTO item VALUES(571,2,103140,19,25,475);
INSERT INTO item VALUES(571,3,102132,3.4,15,51);
INSERT INTO item VALUES(571,4,200376,2.16,80,172.8);
INSERT INTO item VALUES(571,5,200380,3.8,30,114);
INSERT INTO item VALUES(541,1,103140,20,10,200);
INSERT INTO item VALUES(541,2,103141,20,10,200);
INSERT INTO item VALUES(532,1,103120,21.59,60,1295.4);
INSERT INTO item VALUES(527,1,103120,21.59,60,1295.4);
INSERT INTO item VALUES(527,2,103121,27.35,40,1094);
INSERT INTO item VALUES(527,3,103140,19,35,665);
INSERT INTO item VALUES(501,1,103130,3.6,60,216);
INSERT INTO item VALUES(564,1,103130,3.77,80,301.6);
INSERT INTO item VALUES(564,2,103131,3.9,120,468);
INSERT INTO item VALUES(564,3,102132,3.23,40,129.2);
INSERT INTO item VALUES(537,1,103130,3.6,160,576);
INSERT INTO item VALUES(537,2,102132,3.23,30,96.9);
INSERT INTO item VALUES(522,1,103120,21.59,80,1727.2);
INSERT INTO item VALUES(522,2,103121,28.8,10,288);
INSERT INTO item VALUES(522,3,103131,4.04,90,363.6);
INSERT INTO item VALUES(522,4,103141,20,10,200);
INSERT INTO item VALUES(554,1,103131,4.04,70,282.8);
INSERT INTO item VALUES(569,1,103120,22.5,50,1125);
INSERT INTO item VALUES(569,2,103130,3.6,180,648);
INSERT INTO item VALUES(569,3,103141,20,15,300);
INSERT INTO item VALUES(550,1,103120,22.5,60,1350);
INSERT INTO item VALUES(550,2,103140,19,45,855);
INSERT INTO item VALUES(550,3,103141,20,5,100);
INSERT INTO item VALUES(550,4,102132,3.4,15,51);
INSERT INTO item VALUES(548,1,103140,19,30,570);
INSERT INTO item VALUES(548,2,102132,3.23,30,96.9);
INSERT INTO item VALUES(505,1,103130,3.5,100,350);
INSERT INTO item VALUES(505,2,103140,20,15,300);
INSERT INTO item VALUES(577,1,103121,30,20,600);
INSERT INTO item VALUES(577,2,103131,3.9,150,585);
INSERT INTO item VALUES(577,3,102132,3.23,25,80.75);
INSERT INTO item VALUES(533,1,103121,27.35,30,820.5);
INSERT INTO item VALUES(533,2,103130,3.77,80,301.6);
INSERT INTO item VALUES(561,1,103120,22.5,80,1800);
INSERT INTO item VALUES(561,2,103130,3.77,70,263.9);
INSERT INTO item VALUES(561,3,103141,20,15,300);
INSERT INTO item VALUES(561,4,200376,2.16,90,194.4);
INSERT INTO item VALUES(506,1,103120,20.88,80,1670.4);
INSERT INTO item VALUES(506,2,103130,3.5,180,630);
INSERT INTO item VALUES(506,3,103141,20,15,300);
INSERT INTO item VALUES(530,1,103121,25.91,50,1295.5);
INSERT INTO item VALUES(530,2,103130,3.6,200,720);
INSERT INTO item VALUES(530,3,103140,19,40,760);
INSERT INTO item VALUES(530,4,103141,20,10,200);
INSERT INTO item VALUES(530,5,102132,3.4,15,51);
INSERT INTO item VALUES(545,1,103140,19,25,475);
INSERT INTO item VALUES(557,1,103120,23.75,40,950);
INSERT INTO item VALUES(557,2,103121,30,10,300);
INSERT INTO item VALUES(557,3,103140,19,35,665);
INSERT INTO item VALUES(557,4,200376,2.16,80,172.8);
INSERT INTO item VALUES(557,5,200380,3.4,110,374);
INSERT INTO item VALUES(546,1,103120,22.5,50,1125);
INSERT INTO item VALUES(546,2,103121,30,20,600);
INSERT INTO item VALUES(546,3,103130,3.6,120,432);
INSERT INTO item VALUES(546,4,103131,3.9,140,546);
INSERT INTO item VALUES(546,5,103140,19,40,760);
INSERT INTO item VALUES(546,6,103141,20,10,200);
INSERT INTO item VALUES(510,1,103120,20.88,60,1252.8);
INSERT INTO item VALUES(510,2,103131,4.19,20,83.8);

INSERT INTO job VALUES(667,'CLERK');
INSERT INTO job VALUES(668,'STAFF');
INSERT INTO job VALUES(669,'ANALYST');
INSERT INTO job VALUES(670,'SALESPERSON');
INSERT INTO job VALUES(671,'MANAGER');
INSERT INTO job VALUES(672,'PRESIDENT');

INSERT INTO location VALUES(122,'NEW YORK');
INSERT INTO location VALUES(124,'DALLAS');
INSERT INTO location VALUES(123,'CHICAGO');
INSERT INTO location VALUES(167,'BOSTON');

INSERT INTO price VALUES(100871,4.8,3.2,'01/01/1989','01/12/1989');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(100890,58,46.4,'01/01/1989');
INSERT INTO price VALUES(100890,54,40.5,'01/06/1988','31/12/1988');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(100860,35,28,'01/06/1990');
INSERT INTO price VALUES(100860,32,25.6,'01/01/1990','31/05/1990');
INSERT INTO price VALUES(100860,30,24,'01/01/1989','31/12/1989');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(100861,45,36,'01/06/1990');
INSERT INTO price VALUES(100861,42,33.6,'01/01/1990','31/05/1990');
INSERT INTO price VALUES(100861,39,31.2,'01/01/1989','31/12/1989');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(100870,2.8,2.4,'01/01/1990');
INSERT INTO price VALUES(100870,2.4,1.9,'01/01/1989','01/12/1989');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(100871,5.6,4.8,'01/01/1990');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(101860,24,18,'15/02/1989');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(101863,12.5,9.4,'15/02/1989');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(102130,3.4,2.8,'18/08/1989');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(200376,2.4,1.75,'15/11/1990');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(200380,4,3.2,'15/11/1990');
INSERT INTO price VALUES(103120,23.2,18.6,'01/01/1989','31/12/1989');
INSERT INTO price VALUES(103120,24,19.2,'01/01/1990','31/05/1990');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(103120,25,20,'01/06/1990');
INSERT INTO price VALUES(103121,27.8,22.3,'01/01/1989','31/12/1989');
INSERT INTO price VALUES(103121,28.8,23,'01/01/1990','31/05/1990');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(103121,30,24,'01/06/1990');
INSERT INTO price VALUES(103130,4,3.5,'01/01/1989','31/12/1989');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(103130,4.2,3.6,'01/01/1990');
INSERT INTO price VALUES(103131,4.2,3.6,'01/01/1989','31/12/1989');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(103131,4.5,3.9,'01/01/1990');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(103140,20,15,'15/02/1989');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(103141,20,15,'15/02/1989');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(102132,3.4,2.8,'18/08/1989');
INSERT INTO price VALUES(104350,40,32,'01/01/1989','31/12/1989');
INSERT INTO price VALUES(104350,42,33.6,'01/01/1990','31/05/1990');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(104350,44,35.3,'01/06/1990');
INSERT INTO price VALUES(104351,23.6,18.9,'01/01/1989','31/12/1989');
INSERT INTO price VALUES(104351,24.8,19.8,'01/01/1990','31/05/1990');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(104351,26,20.8,'01/06/1990');
INSERT INTO price VALUES(104352,50,35,'01/01/1989','31/12/1989');
INSERT INTO price VALUES(104352,54,37.8,'01/01/1990','31/05/1990');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(104352,58.3,40.8,'01/06/1990');
INSERT INTO price VALUES(104360,36,29.5,'01/01/1989','31/12/1989');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(104360,39,32,'01/01/1990');
INSERT INTO price VALUES(104361,47,33,'01/01/1989','31/12/1989');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(104361,50,35,'01/01/1990');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(104362,5,4,'15/02/1989');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(102134,3.4,2.8,'18/08/1989');
INSERT INTO price VALUES(105123,36.3,29,'01/01/1989','31/12/1989');
INSERT INTO price VALUES(105123,37.7,32,'01/01/1990','31/05/1990');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(105123,40,34,'01/06/1990');
INSERT INTO price VALUES(105124,10,7.6,'01/01/1989','31/12/1989');
INSERT INTO price VALUES(105124,12,9,'01/01/1990','31/05/1990');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(105124,15,10,'01/06/1990');
INSERT INTO price VALUES(105125,2,1.7,'01/01/1989','31/12/1989');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(105125,3,2.6,'01/01/1990');
INSERT INTO price VALUES(105126,5,4.3,'01/01/1989','31/12/1989');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(105126,6,5,'01/01/1990');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(105127,6,5,'15/11/1990');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(105128,10,8,'15/11/1990');
INSERT INTO price (PRODUCT_ID,LIST_PRICE,MIN_PRICE,START_DATE) VALUES(102136,3.4,2.8,'18/08/1989');

INSERT INTO product VALUES(100860,'ACE TENNIS RACKET I');
INSERT INTO product VALUES(100861,'ACE TENNIS RACKET II');
INSERT INTO product VALUES(100870,'ACE TENNIS BALLS-3 PACK');
INSERT INTO product VALUES(100871,'ACE TENNIS BALLS-6 PACK');
INSERT INTO product VALUES(100890,'ACE TENNIS NET');
INSERT INTO product VALUES(101860,'SP TENNIS RACKET');
INSERT INTO product VALUES(101863,'SP JUNIOR RACKET');
INSERT INTO product VALUES(102130,'RH: "GUIDE TO TENNIS"');
INSERT INTO product VALUES(200376,'SB ENERGY BAR-6 PACK');
INSERT INTO product VALUES(200380,'SB VITA SNACK-6 PACK');
INSERT INTO product VALUES(103120,'WIFF SOFTBALL BAT I');
INSERT INTO product VALUES(103121,'WIFF SOFTBALL BAT II');
INSERT INTO product VALUES(103130,'WIFF SOFTBALL, SMALL');
INSERT INTO product VALUES(103131,'WIFF SOFTBALL, LARGE');
INSERT INTO product VALUES(103140,'WIFF SOFTBALL MITT (LH)');
INSERT INTO product VALUES(103141,'WIFF SOFTBALL MITT (RH)');
INSERT INTO product VALUES(102132,'RH: "GUIDE TO SOFTBALL"');
INSERT INTO product VALUES(104350,'DUNK BASKETBALL INDOOR');
INSERT INTO product VALUES(104351,'DUNK BASKETBALL OUTDOOR');
INSERT INTO product VALUES(104352,'DUNK BASKETBALL PROFESSIONAL');
INSERT INTO product VALUES(104360,'DUNK HOOP');
INSERT INTO product VALUES(104361,'DUNK HOOP W/FIBERGLASS BOARD');
INSERT INTO product VALUES(104362,'DUNK NETS - RAINBOW');
INSERT INTO product VALUES(102134,'RH: "GUIDE TO BASKETBALL"');
INSERT INTO product VALUES(105123,'YELLOW JERSEY BICYCLE HELMET');
INSERT INTO product VALUES(105124,'YELLOW JERSEY BICYCLE GLOVES');
INSERT INTO product VALUES(105125,'YELLOW JERSEY WATER BOTTLE');
INSERT INTO product VALUES(105126,'YELLOW JERSEY BOTTLE CAGE');
INSERT INTO product VALUES(105127,'YELLOW JERSEY FRAME PUMP');
INSERT INTO product VALUES(105128,'YELLOW JERSEY SADDLE PACK');
INSERT INTO product VALUES(102136,'RH: "GUIDE TO CYCLING"');

INSERT INTO sales_order VALUES(610,'07/01/1991',101,'08/01/1991',101.4);
INSERT INTO sales_order VALUES(611,'11/01/1991',102,'11/01/1991',45);
INSERT INTO sales_order VALUES(612,'15/01/1991',104,'20/01/1991',5860);
INSERT INTO sales_order VALUES(601,'01/05/1990',106,'30/05/1990',60.8);
INSERT INTO sales_order VALUES(602,'05/06/1990',102,'20/06/1990',56);
INSERT INTO sales_order VALUES(600,'01/05/1990',103,'29/05/1990',42);
INSERT INTO sales_order VALUES(604,'15/06/1990',106,'30/06/1990',642);
INSERT INTO sales_order VALUES(605,'14/07/1990',106,'30/07/1990',8374);
INSERT INTO sales_order VALUES(606,'14/07/1990',100,'30/07/1990',3.4);
INSERT INTO sales_order VALUES(609,'01/08/1990',100,'15/08/1990',102.5);
INSERT INTO sales_order VALUES(607,'18/07/1990',104,'18/07/1990',5.6);
INSERT INTO sales_order VALUES(608,'25/07/1990',104,'25/07/1990',35.2);
INSERT INTO sales_order VALUES(603,'05/06/1990',102,'05/06/1990',224);
INSERT INTO sales_order VALUES(620,'12/03/1991',100,'12/03/1991',4450);
INSERT INTO sales_order VALUES(613,'01/02/1991',108,'01/02/1991',6400);
INSERT INTO sales_order VALUES(614,'01/02/1991',102,'05/02/1991',23940);
INSERT INTO sales_order VALUES(616,'03/02/1991',103,'10/02/1991',764);
INSERT INTO sales_order VALUES(619,'22/02/1991',104,'04/03/1991',1260);
INSERT INTO sales_order VALUES(617,'05/02/1991',105,'03/03/1991',46370);
INSERT INTO sales_order VALUES(615,'01/02/1991',107,'06/02/1991',710);
INSERT INTO sales_order VALUES(618,'15/02/1991',102,'06/03/1991',3083);
INSERT INTO sales_order VALUES(621,'15/03/1991',100,'01/04/1991',730);
INSERT INTO sales_order VALUES(509,'04/06/1989',226,'10/06/1989',1174);
INSERT INTO sales_order VALUES(523,'13/02/1990',226,'13/02/1990',1165);
INSERT INTO sales_order VALUES(549,'27/12/1990',226,'14/01/1991',1620);
INSERT INTO sales_order VALUES(507,'26/05/1989',228,'27/05/1989',886);
INSERT INTO sales_order VALUES(516,'30/09/1989',228,'03/10/1989',1815);
INSERT INTO sales_order VALUES(553,'02/02/1991',228,'13/02/1991',4400);
INSERT INTO sales_order VALUES(526,'04/03/1990',221,'07/03/1990',7700);
INSERT INTO sales_order VALUES(543,'04/09/1990',221,'07/09/1990',8400);
INSERT INTO sales_order VALUES(555,'04/03/1991',221,'07/03/1991',8540);
INSERT INTO sales_order VALUES(559,'16/11/1990',222,'23/04/1991',387.2);
INSERT INTO sales_order VALUES(528,'24/03/1990',224,'24/03/1990',3770);
INSERT INTO sales_order VALUES(531,'31/03/1990',224,'02/04/1990',1400);
INSERT INTO sales_order VALUES(558,'31/03/1991',224,'02/04/1991',1700);
INSERT INTO sales_order VALUES(525,'28/02/1990',225,'03/03/1990',377);
INSERT INTO sales_order VALUES(552,'02/02/1991',223,'07/02/1991',555.8);
INSERT INTO sales_order VALUES(556,'10/03/1991',223,'12/03/1991',85);
INSERT INTO sales_order VALUES(560,'25/04/1991',223,'25/04/1991',72);
INSERT INTO sales_order VALUES(565,'01/06/1991',227,'03/06/1991',4900);
INSERT INTO sales_order VALUES(574,'10/10/1991',201,'12/10/1991',1685);
INSERT INTO sales_order VALUES(576,'13/10/1991',201,'18/10/1991',2058.9);
INSERT INTO sales_order VALUES(503,'25/03/1989',201,'06/04/1989',1876);
INSERT INTO sales_order VALUES(518,'20/10/1989',201,'05/11/1989',2932.5);
INSERT INTO sales_order VALUES(517,'23/10/1989',201,'07/11/1989',784);
INSERT INTO sales_order VALUES(544,'11/09/1990',202,'15/09/1990',2358);
INSERT INTO sales_order VALUES(524,'22/02/1990',202,'04/03/1990',1979);
INSERT INTO sales_order VALUES(502,'10/02/1989',202,'23/02/1989',500);
INSERT INTO sales_order VALUES(539,'26/06/1990',202,'03/07/1990',1300);
INSERT INTO sales_order VALUES(511,'17/08/1989',202,'21/08/1989',647);
INSERT INTO sales_order VALUES(512,'28/08/1989',203,'13/09/1989',428);
INSERT INTO sales_order VALUES(562,'04/05/1991',203,'19/05/1991',2044.5);
INSERT INTO sales_order VALUES(529,'02/04/1990',203,'05/04/1990',1264.7);
INSERT INTO sales_order VALUES(563,'25/05/1991',204,'26/05/1991',889);
INSERT INTO sales_order VALUES(568,'13/07/1991',204,'21/07/1991',1217.4);
INSERT INTO sales_order VALUES(504,'11/04/1989',204,'12/04/1989',1434.7);
INSERT INTO sales_order VALUES(538,'23/06/1990',204,'26/06/1990',741);
INSERT INTO sales_order VALUES(535,'28/05/1990',204,'09/06/1990',810);
INSERT INTO sales_order VALUES(578,'19/11/1991',204,'04/12/1991',2275.6);
INSERT INTO sales_order VALUES(534,'11/05/1990',206,'15/05/1990',420);
INSERT INTO sales_order VALUES(536,'21/05/1990',206,'06/06/1990',2135.6);
INSERT INTO sales_order VALUES(572,'19/08/1991',206,'24/08/1991',1200.5);
INSERT INTO sales_order VALUES(514,'05/09/1989',207,'16/09/1989',1140);
INSERT INTO sales_order VALUES(521,'20/11/1989',207,'23/11/1989',896.9);
INSERT INTO sales_order VALUES(551,'22/01/1991',208,'06/02/1991',1142);
INSERT INTO sales_order VALUES(513,'06/09/1989',208,'14/09/1989',1497);
INSERT INTO sales_order VALUES(508,'26/05/1989',208,'08/06/1989',1080);
INSERT INTO sales_order VALUES(515,'19/09/1989',208,'26/09/1989',1428.5);
INSERT INTO sales_order VALUES(542,'11/08/1990',208,'23/08/1990',2409);
INSERT INTO sales_order VALUES(573,'10/10/1991',201,'12/10/1991',1627);
INSERT INTO sales_order VALUES(566,'09/06/1991',201,'12/06/1991',3389.2);
INSERT INTO sales_order VALUES(520,'16/11/1989',201,'19/11/1989',341.6);
INSERT INTO sales_order VALUES(519,'20/10/1989',201,'05/11/1989',955);
INSERT INTO sales_order VALUES(575,'04/10/1991',201,'17/10/1991',684);
INSERT INTO sales_order VALUES(547,'16/10/1990',202,'27/10/1990',984.4);
INSERT INTO sales_order VALUES(540,'15/07/1990',202,'17/07/1990',861.2);
INSERT INTO sales_order VALUES(567,'05/07/1991',202,'07/07/1991',200);
INSERT INTO sales_order VALUES(570,'17/07/1991',202,'24/07/1991',663.6);
INSERT INTO sales_order VALUES(571,'02/08/1991',202,'12/08/1991',1095.6);
INSERT INTO sales_order VALUES(541,'08/08/1990',203,'18/08/1990',400);
INSERT INTO sales_order VALUES(532,'08/04/1990',203,'21/04/1990',1295.4);
INSERT INTO sales_order VALUES(527,'27/02/1990',204,'14/03/1990',3054.4);
INSERT INTO sales_order VALUES(501,'06/01/1989',204,'11/01/1989',216);
INSERT INTO sales_order VALUES(564,'25/05/1991',204,'26/05/1991',898.8);
INSERT INTO sales_order VALUES(537,'14/06/1990',204,'26/06/1990',672.9);
INSERT INTO sales_order VALUES(522,'07/01/1990',204,'10/01/1990',2578.8);
INSERT INTO sales_order VALUES(554,'18/02/1991',204,'22/02/1991',282.8);
INSERT INTO sales_order VALUES(569,'16/07/1991',205,'23/07/1991',2073);
INSERT INTO sales_order VALUES(550,'27/01/1991',205,'07/02/1991',2356);
INSERT INTO sales_order VALUES(548,'26/11/1990',205,'12/12/1990',666.9);
INSERT INTO sales_order VALUES(505,'07/04/1989',206,'22/04/1989',650);
INSERT INTO sales_order VALUES(577,'06/10/1991',206,'20/10/1991',1265.75);
INSERT INTO sales_order VALUES(533,'28/04/1990',206,'02/05/1990',1122.1);
INSERT INTO sales_order VALUES(561,'20/04/1991',207,'07/05/1991',2558.3);
INSERT INTO sales_order VALUES(506,'27/04/1989',208,'10/05/1989',2600.4);
INSERT INTO sales_order VALUES(530,'03/04/1990',208,'07/04/1990',3026.5);
INSERT INTO sales_order VALUES(545,'06/10/1990',208,'13/10/1990',475);
INSERT INTO sales_order VALUES(557,'08/03/1991',208,'12/03/1991',2461.8);
INSERT INTO sales_order VALUES(546,'17/10/1990',208,'23/10/1990',3663);
INSERT INTO sales_order VALUES(510,'18/07/1989',208,'21/07/1989',1336.6);

ALTER TABLE PRICE ADD 
	FOREIGN KEY (Product_id) 
	REFERENCES Product (Product_id);

ALTER TABLE ITEM ADD
	FOREIGN KEY (Product_id)
	REFERENCES Product (Product_id),
    ADD
	FOREIGN KEY (Order_id)
	REFERENCES Sales_Order (Order_id);

ALTER TABLE SALES_ORDER ADD
	FOREIGN KEY (Customer_id)
	REFERENCES Customer(Customer_id);

ALTER TABLE CUSTOMER ADD
	FOREIGN KEY (Salesperson_id)
	REFERENCES Employee(Employee_id);

ALTER TABLE Employee ADD
	FOREIGN KEY (Manager_id)
	REFERENCES Employee(Employee_id),
    ADD 
	FOREIGN KEY (Job_id)
	REFERENCES Job(Job_id),
    ADD
	FOREIGN KEY (Department_id)
	REFERENCES Department(Department_id);

ALTER TABLE Department ADD
	FOREIGN KEY (Location_id)
	REFERENCES Location(Location_id);

