empdml.sql 44 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039
  1. /*
  2. * The contents of this file are subject to the Interbase Public
  3. * License Version 1.0 (the "License"); you may not use this file
  4. * except in compliance with the License. You may obtain a copy
  5. * of the License at http://www.Inprise.com/IPL.html
  6. *
  7. * Software distributed under the License is distributed on an
  8. * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
  9. * or implied. See the License for the specific language governing
  10. * rights and limitations under the License.
  11. *
  12. * The Original Code was created by Inprise Corporation
  13. * and its predecessors. Portions created by Inprise Corporation are
  14. * Copyright (C) Inprise Corporation.
  15. *
  16. * All Rights Reserved.
  17. * Contributor(s): ______________________________________.
  18. */
  19. /****************************************************************************
  20. *
  21. * Create data.
  22. *
  23. *****************************************************************************/
  24. /*
  25. * Add countries.
  26. */
  27. INSERT INTO country (country, currency) VALUES ('USA', 'Dollar');
  28. INSERT INTO country (country, currency) VALUES ('England', 'Pound');
  29. INSERT INTO country (country, currency) VALUES ('Canada', 'CdnDlr');
  30. INSERT INTO country (country, currency) VALUES ('Switzerland', 'SFranc');
  31. INSERT INTO country (country, currency) VALUES ('Japan', 'Yen');
  32. INSERT INTO country (country, currency) VALUES ('Italy', 'Euro');
  33. INSERT INTO country (country, currency) VALUES ('France', 'Euro');
  34. INSERT INTO country (country, currency) VALUES ('Germany', 'Euro');
  35. INSERT INTO country (country, currency) VALUES ('Australia', 'ADollar');
  36. INSERT INTO country (country, currency) VALUES ('Hong Kong', 'HKDollar');
  37. INSERT INTO country (country, currency) VALUES ('Netherlands', 'Euro');
  38. INSERT INTO country (country, currency) VALUES ('Belgium', 'Euro');
  39. INSERT INTO country (country, currency) VALUES ('Austria', 'Euro');
  40. INSERT INTO country (country, currency) VALUES ('Fiji', 'FDollar');
  41. INSERT INTO country (country, currency) VALUES ('Russia', 'Ruble');
  42. INSERT INTO country (country, currency) VALUES ('Romania', 'RLeu');
  43. COMMIT;
  44. /*
  45. * Add departments.
  46. * Don't assign managers yet.
  47. *
  48. * Department structure (4-levels):
  49. *
  50. * Corporate Headquarters
  51. * Finance
  52. * Sales and Marketing
  53. * Marketing
  54. * Pacific Rim Headquarters (Hawaii)
  55. * Field Office: Tokyo
  56. * Field Office: Singapore
  57. * European Headquarters (London)
  58. * Field Office: France
  59. * Field Office: Italy
  60. * Field Office: Switzerland
  61. * Field Office: Canada
  62. * Field Office: East Coast
  63. * Engineering
  64. * Software Products Division (California)
  65. * Software Development
  66. * Quality Assurance
  67. * Customer Support
  68. * Consumer Electronics Division (Vermont)
  69. * Research and Development
  70. * Customer Services
  71. *
  72. * Departments have parent departments.
  73. * Corporate Headquarters is the top department in the company.
  74. * Singapore field office is new and has 0 employees.
  75. *
  76. */
  77. INSERT INTO department
  78. (dept_no, department, head_dept, budget, location, phone_no) VALUES
  79. ('000', 'Corporate Headquarters', null, 1000000, 'Monterey','(408) 555-1234');
  80. INSERT INTO department
  81. (dept_no, department, head_dept, budget, location, phone_no) VALUES
  82. ('100', 'Sales and Marketing', '000', 2000000, 'San Francisco',
  83. '(415) 555-1234');
  84. INSERT INTO department
  85. (dept_no, department, head_dept, budget, location, phone_no) VALUES
  86. ('600', 'Engineering', '000', 1100000, 'Monterey', '(408) 555-1234');
  87. INSERT INTO department
  88. (dept_no, department, head_dept, budget, location, phone_no) VALUES
  89. ('900', 'Finance', '000', 400000, 'Monterey', '(408) 555-1234');
  90. INSERT INTO department
  91. (dept_no, department, head_dept, budget, location, phone_no) VALUES
  92. ('180', 'Marketing', '100', 1500000, 'San Francisco', '(415) 555-1234');
  93. INSERT INTO department
  94. (dept_no, department, head_dept, budget, location, phone_no) VALUES
  95. ('620', 'Software Products Div.', '600', 1200000, 'Monterey', '(408) 555-1234');
  96. INSERT INTO department
  97. (dept_no, department, head_dept, budget, location, phone_no) VALUES
  98. ('621', 'Software Development', '620', 400000, 'Monterey', '(408) 555-1234');
  99. INSERT INTO department
  100. (dept_no, department, head_dept, budget, location, phone_no) VALUES
  101. ('622', 'Quality Assurance', '620', 300000, 'Monterey', '(408) 555-1234');
  102. INSERT INTO department
  103. (dept_no, department, head_dept, budget, location, phone_no) VALUES
  104. ('623', 'Customer Support', '620', 650000, 'Monterey', '(408) 555-1234');
  105. INSERT INTO department
  106. (dept_no, department, head_dept, budget, location, phone_no) VALUES
  107. ('670', 'Consumer Electronics Div.', '600', 1150000, 'Burlington, VT',
  108. '(802) 555-1234');
  109. INSERT INTO department
  110. (dept_no, department, head_dept, budget, location, phone_no) VALUES
  111. ('671', 'Research and Development', '670', 460000, 'Burlington, VT',
  112. '(802) 555-1234');
  113. INSERT INTO department
  114. (dept_no, department, head_dept, budget, location, phone_no) VALUES
  115. ('672', 'Customer Services', '670', 850000, 'Burlington, VT', '(802) 555-1234');
  116. INSERT INTO department
  117. (dept_no, department, head_dept, budget, location, phone_no) VALUES
  118. ('130', 'Field Office: East Coast', '100', 500000, 'Boston', '(617) 555-1234');
  119. INSERT INTO department
  120. (dept_no, department, head_dept, budget, location, phone_no) VALUES
  121. ('140', 'Field Office: Canada', '100', 500000, 'Toronto', '(416) 677-1000');
  122. INSERT INTO department
  123. (dept_no, department, head_dept, budget, location, phone_no) VALUES
  124. ('110', 'Pacific Rim Headquarters', '100', 600000, 'Kuaui', '(808) 555-1234');
  125. INSERT INTO department
  126. (dept_no, department, head_dept, budget, location, phone_no) VALUES
  127. ('115', 'Field Office: Japan', '110', 500000, 'Tokyo', '3 5350 0901');
  128. INSERT INTO department
  129. (dept_no, department, head_dept, budget, location, phone_no) VALUES
  130. ('116', 'Field Office: Singapore', '110', 300000, 'Singapore', '3 55 1234');
  131. INSERT INTO department
  132. (dept_no, department, head_dept, budget, location, phone_no) VALUES
  133. ('120', 'European Headquarters', '100', 700000, 'London', '71 235-4400');
  134. INSERT INTO department
  135. (dept_no, department, head_dept, budget, location, phone_no) VALUES
  136. ('121', 'Field Office: Switzerland','120', 500000, 'Zurich', '1 211 7767');
  137. INSERT INTO department
  138. (dept_no, department, head_dept, budget, location, phone_no) VALUES
  139. ('123', 'Field Office: France', '120', 400000, 'Cannes', '58 68 11 12');
  140. INSERT INTO department
  141. (dept_no, department, head_dept, budget, location, phone_no) VALUES
  142. ('125', 'Field Office: Italy', '120', 400000, 'Milan', '2 430 39 39');
  143. COMMIT;
  144. /*
  145. * Add jobs.
  146. * Job requirements (blob) and languages (array) are not added here.
  147. */
  148. INSERT INTO job
  149. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  150. ('CEO', 1, 'USA', 'Chief Executive Officer', 130000, 250000);
  151. INSERT INTO job
  152. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  153. ('CFO', 1, 'USA', 'Chief Financial Officer', 85000, 140000);
  154. INSERT INTO job
  155. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  156. ('VP', 2, 'USA', 'Vice President', 80000, 130000);
  157. INSERT INTO job
  158. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  159. ('Dir', 2, 'USA', 'Director', 75000, 120000);
  160. INSERT INTO job
  161. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  162. ('Mngr', 3, 'USA', 'Manager', 60000, 100000);
  163. INSERT INTO job
  164. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  165. ('Mngr', 4, 'USA', 'Manager', 30000, 60000);
  166. INSERT INTO job
  167. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  168. ('Admin', 4, 'USA', 'Administrative Assistant', 35000, 55000);
  169. INSERT INTO job
  170. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  171. ('Admin', 5, 'USA', 'Administrative Assistant', 20000, 40000);
  172. INSERT INTO job
  173. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  174. ('Admin', 5, 'England', 'Administrative Assistant', 13400, 26800) /* pounds */;
  175. INSERT INTO job
  176. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  177. ('PRel', 4, 'USA', 'Public Relations Rep.', 25000, 65000);
  178. INSERT INTO job
  179. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  180. ('Mktg', 3, 'USA', 'Marketing Analyst', 40000, 80000);
  181. INSERT INTO job
  182. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  183. ('Mktg', 4, 'USA', 'Marketing Analyst', 20000, 50000);
  184. INSERT INTO job
  185. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  186. ('Accnt', 4, 'USA', 'Accountant', 28000, 55000);
  187. INSERT INTO job
  188. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  189. ('Finan', 3, 'USA', 'Financial Analyst', 35000, 85000);
  190. INSERT INTO job
  191. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  192. ('Eng', 2, 'USA', 'Engineer', 70000, 110000);
  193. INSERT INTO job
  194. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  195. ('Eng', 3, 'USA', 'Engineer', 50000, 90000);
  196. INSERT INTO job
  197. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  198. ('Eng', 3, 'Japan', 'Engineer', 5400000, 9720000) /* yen */;
  199. INSERT INTO job
  200. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  201. ('Eng', 4, 'USA', 'Engineer', 30000, 65000);
  202. INSERT INTO job
  203. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  204. ('Eng', 4, 'England', 'Engineer', 20100, 43550) /* Pounds */;
  205. INSERT INTO job
  206. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  207. ('Eng', 5, 'USA', 'Engineer', 25000, 35000);
  208. INSERT INTO job
  209. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  210. ('Doc', 3, 'USA', 'Technical Writer', 38000, 60000);
  211. INSERT INTO job
  212. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  213. ('Doc', 5, 'USA', 'Technical Writer', 22000, 40000);
  214. INSERT INTO job
  215. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  216. ('Sales', 3, 'USA', 'Sales Co-ordinator', 40000, 70000);
  217. INSERT INTO job
  218. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  219. ('Sales', 3, 'England', 'Sales Co-ordinator', 26800, 46900) /* pounds */;
  220. INSERT INTO job
  221. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  222. ('SRep', 4, 'USA', 'Sales Representative', 20000, 100000);
  223. INSERT INTO job
  224. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  225. ('SRep', 4, 'England', 'Sales Representative', 13400, 67000) /* pounds */;
  226. INSERT INTO job
  227. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  228. ('SRep', 4, 'Canada', 'Sales Representative', 26400, 132000) /* CndDollar */;
  229. INSERT INTO job
  230. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  231. ('SRep', 4, 'Switzerland', 'Sales Representative', 28000, 149000) /* SFranc */;
  232. INSERT INTO job
  233. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  234. ('SRep', 4, 'Japan', 'Sales Representative', 2160000, 10800000) /* yen */;
  235. INSERT INTO job
  236. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  237. ('SRep', 4, 'Italy', 'Sales Representative', 20000, 100000) /* Euro */;
  238. INSERT INTO job
  239. (job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
  240. ('SRep', 4, 'France', 'Sales Representative', 20000, 100000) /* Euro */;
  241. COMMIT;
  242. /*
  243. * Add employees.
  244. *
  245. * The salaries initialized here are not final. Employee salaries are
  246. * updated below -- see salary_history.
  247. */
  248. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  249. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  250. (2, 'Robert', 'Nelson', '600', 'VP', 2, 'USA', '12/28/88', 98000, '250');
  251. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  252. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  253. (4, 'Bruce', 'Young', '621', 'Eng', 2, 'USA', '12/28/88', 90000, '233');
  254. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  255. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  256. (5, 'Kim', 'Lambert', '130', 'Eng', 2, 'USA', '02/06/89', 95000, '22');
  257. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  258. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  259. (8, 'Leslie', 'Johnson', '180', 'Mktg', 3, 'USA', '04/05/89', 62000, '410');
  260. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  261. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  262. (9, 'Phil', 'Forest', '622', 'Mngr', 3, 'USA', '04/17/89', 72000, '229');
  263. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  264. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  265. (11, 'K. J.', 'Weston', '130', 'SRep', 4, 'USA', '01/17/90', 70000, '34');
  266. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  267. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  268. (12, 'Terri', 'Lee', '000', 'Admin', 4, 'USA', '05/01/90', 48000, '256');
  269. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  270. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  271. (14, 'Stewart', 'Hall', '900', 'Finan', 3, 'USA', '06/04/90', 62000, '227');
  272. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  273. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  274. (15, 'Katherine', 'Young', '623', 'Mngr', 3, 'USA', '06/14/90', 60000, '231');
  275. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  276. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  277. (20, 'Chris', 'Papadopoulos', '671', 'Mngr', 3, 'USA', '01/01/90', 80000,
  278. '887');
  279. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  280. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  281. (24, 'Pete', 'Fisher', '671', 'Eng', 3, 'USA', '09/12/90', 73000, '888');
  282. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  283. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  284. (28, 'Ann', 'Bennet', '120', 'Admin', 5, 'England', '02/01/91', 20000, '5');
  285. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  286. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  287. (29, 'Roger', 'De Souza', '623', 'Eng', 3, 'USA', '02/18/91', 62000, '288');
  288. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  289. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  290. (34, 'Janet', 'Baldwin', '110', 'Sales', 3, 'USA', '03/21/91', 55000, '2');
  291. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  292. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  293. (36, 'Roger', 'Reeves', '120', 'Sales', 3, 'England', '04/25/91', 30000, '6');
  294. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  295. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  296. (37, 'Willie', 'Stansbury','120', 'Eng', 4, 'England', '04/25/91', 35000, '7');
  297. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  298. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  299. (44, 'Leslie', 'Phong', '623', 'Eng', 4, 'USA', '06/03/91', 50000, '216');
  300. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  301. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  302. (45, 'Ashok', 'Ramanathan', '621', 'Eng', 3, 'USA', '08/01/91', 72000, '209');
  303. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  304. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  305. (46, 'Walter', 'Steadman', '900', 'CFO', 1, 'USA', '08/09/91', 120000, '210');
  306. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  307. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  308. (52, 'Carol', 'Nordstrom', '180', 'PRel', 4, 'USA', '10/02/91', 41000, '420');
  309. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  310. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  311. (61, 'Luke', 'Leung', '110', 'SRep', 4, 'USA', '02/18/92', 60000, '3');
  312. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  313. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  314. (65, 'Sue Anne','O''Brien', '670', 'Admin', 5, 'USA', '03/23/92', 30000, '877');
  315. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  316. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  317. (71, 'Jennifer M.', 'Burbank', '622', 'Eng', 3, 'USA', '04/15/92', 51000,
  318. '289');
  319. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  320. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  321. (72, 'Claudia', 'Sutherland', '140', 'SRep', 4, 'Canada', '04/20/92', 88000,
  322. null);
  323. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  324. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  325. (83, 'Dana', 'Bishop', '621', 'Eng', 3, 'USA', '06/01/92', 60000, '290');
  326. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  327. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  328. (85, 'Mary S.', 'MacDonald', '100', 'VP', 2, 'USA', '06/01/92', 115000, '477');
  329. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  330. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  331. (94, 'Randy', 'Williams', '672', 'Mngr', 4, 'USA', '08/08/92', 54000, '892');
  332. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  333. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  334. (105, 'Oliver H.', 'Bender', '000', 'CEO', 1, 'USA', '10/08/92', 220000, '255');
  335. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  336. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  337. (107, 'Kevin', 'Cook', '670', 'Dir', 2, 'USA', '02/01/93', 115000, '894');
  338. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  339. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  340. (109, 'Kelly', 'Brown', '600', 'Admin', 5, 'USA', '02/04/93', 27000, '202');
  341. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  342. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  343. (110, 'Yuki', 'Ichida', '115', 'Eng', 3, 'Japan', '02/04/93',
  344. 6000000, '22');
  345. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  346. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  347. (113, 'Mary', 'Page', '671', 'Eng', 4, 'USA', '04/12/93', 48000, '845');
  348. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  349. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  350. (114, 'Bill', 'Parker', '623', 'Eng', 5, 'USA', '06/01/93', 35000, '247');
  351. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  352. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  353. (118, 'Takashi', 'Yamamoto', '115', 'SRep', 4, 'Japan', '07/01/93',
  354. 6800000, '23');
  355. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  356. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  357. (121, 'Roberto', 'Ferrari', '125', 'SRep', 4, 'Italy', '07/12/93',
  358. 30000, '1');
  359. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  360. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  361. (127, 'Michael', 'Yanowski', '100', 'SRep', 4, 'USA', '08/09/93', 40000, '492');
  362. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  363. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  364. (134, 'Jacques', 'Glon', '123', 'SRep', 4, 'France', '08/23/93', 35000, null);
  365. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  366. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  367. (136, 'Scott', 'Johnson', '623', 'Doc', 3, 'USA', '09/13/93', 60000, '265');
  368. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  369. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  370. (138, 'T.J.', 'Green', '621', 'Eng', 4, 'USA', '11/01/93', 36000, '218');
  371. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  372. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  373. (141, 'Pierre', 'Osborne', '121', 'SRep', 4, 'Switzerland', '01/03/94',
  374. 110000, null);
  375. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  376. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  377. (144, 'John', 'Montgomery', '672', 'Eng', 5, 'USA', '03/30/94', 35000, '820');
  378. INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
  379. job_grade, job_country, hire_date, salary, phone_ext) VALUES
  380. (145, 'Mark', 'Guckenheimer', '622', 'Eng', 5, 'USA', '05/02/94', 32000, '221');
  381. COMMIT;
  382. SET GENERATOR emp_no_gen to 145;
  383. /*
  384. * Set department managers.
  385. * A department manager can be a director, a vice president, a CFO,
  386. * a sales rep, etc. Several departments have no managers (TBH).
  387. */
  388. UPDATE department SET mngr_no = 105 WHERE dept_no = '000';
  389. UPDATE department SET mngr_no = 85 WHERE dept_no = '100';
  390. UPDATE department SET mngr_no = 2 WHERE dept_no = '600';
  391. UPDATE department SET mngr_no = 46 WHERE dept_no = '900';
  392. UPDATE department SET mngr_no = 9 WHERE dept_no = '622';
  393. UPDATE department SET mngr_no = 15 WHERE dept_no = '623';
  394. UPDATE department SET mngr_no = 107 WHERE dept_no = '670';
  395. UPDATE department SET mngr_no = 20 WHERE dept_no = '671';
  396. UPDATE department SET mngr_no = 94 WHERE dept_no = '672';
  397. UPDATE department SET mngr_no = 11 WHERE dept_no = '130';
  398. UPDATE department SET mngr_no = 72 WHERE dept_no = '140';
  399. UPDATE department SET mngr_no = 118 WHERE dept_no = '115';
  400. UPDATE department SET mngr_no = 36 WHERE dept_no = '120';
  401. UPDATE department SET mngr_no = 141 WHERE dept_no = '121';
  402. UPDATE department SET mngr_no = 134 WHERE dept_no = '123';
  403. UPDATE department SET mngr_no = 121 WHERE dept_no = '125';
  404. UPDATE department SET mngr_no = 34 WHERE dept_no = '110';
  405. COMMIT;
  406. /*
  407. * Generate some salary history records.
  408. */
  409. UPDATE employee SET salary = salary + salary * 0.10
  410. WHERE hire_date <= '08/01/91' AND job_grade = 5;
  411. UPDATE employee SET salary = salary + salary * 0.05 + 3000
  412. WHERE hire_date <= '08/01/91' AND job_grade in (1, 2);
  413. UPDATE employee SET salary = salary + salary * 0.075
  414. WHERE hire_date <= '08/01/91' AND job_grade in (3, 4) AND emp_no > 9;
  415. UPDATE salary_history
  416. SET change_date = '12/15/92', updater_id = 'admin2';
  417. UPDATE employee SET salary = salary + salary * 0.0425
  418. WHERE hire_date < '02/01/93' AND job_grade >= 3;
  419. UPDATE salary_history
  420. SET change_date = '09/08/93', updater_id = 'elaine'
  421. WHERE NOT updater_id IN ('admin2');
  422. UPDATE employee SET salary = salary - salary * 0.0325
  423. WHERE salary > 110000 AND job_country = 'USA';
  424. UPDATE salary_history
  425. SET change_date = '12/20/93', updater_id = 'tj'
  426. WHERE NOT updater_id IN ('admin2', 'elaine');
  427. UPDATE employee SET salary = salary + salary * 0.10
  428. WHERE job_code = 'SRep' AND hire_date < '12/20/93';
  429. UPDATE salary_history
  430. SET change_date = '12/20/93', updater_id = 'elaine'
  431. WHERE NOT updater_id IN ('admin2', 'elaine', 'tj');
  432. COMMIT;
  433. /*
  434. * Add projects.
  435. * Some projects have no team leader.
  436. */
  437. INSERT INTO project (proj_id, proj_name, team_leader, product) VALUES
  438. ('VBASE', 'Video Database', 45, 'software');
  439. /* proj_desc blob:
  440. Design a video data base management system for
  441. controlling on-demand video distribution.
  442. */
  443. INSERT INTO project (proj_id, proj_name, team_leader, product) VALUES
  444. ('DGPII', 'DigiPizza', 24, 'other');
  445. /* proj_desc blob:
  446. Develop second generation digital pizza maker
  447. with flash-bake heating element and
  448. digital ingredient measuring system.
  449. */
  450. INSERT INTO project (proj_id, proj_name, team_leader, product) VALUES
  451. ('GUIDE', 'AutoMap', 20, 'hardware');
  452. /* proj_desc blob:
  453. Develop a prototype for the automobile version of
  454. the hand-held map browsing device.
  455. */
  456. INSERT INTO project (proj_id, proj_name, team_leader, product) VALUES
  457. ('MAPDB', 'MapBrowser port', 4, 'software');
  458. /* proj_desc blob:
  459. Port the map browsing database software to run
  460. on the automobile model.
  461. */
  462. INSERT INTO project (proj_id, proj_name, team_leader, product) VALUES
  463. ('HWRII', 'Translator upgrade', null, 'software');
  464. /* proj_desc blob:
  465. Integrate the hand-writing recognition module into the
  466. universal language translator.
  467. */
  468. INSERT INTO project (proj_id, proj_name, team_leader, product) VALUES
  469. ('MKTPR', 'Marketing project 3', 85, 'N/A');
  470. /* proj_desc blob:
  471. Expand marketing and sales in the Pacific Rim.
  472. Set up a field office in Australia and Singapore.
  473. */
  474. COMMIT;
  475. /*
  476. * Assign employees to projects.
  477. * One project has no employees assigned.
  478. */
  479. INSERT INTO employee_project (proj_id, emp_no) VALUES ('DGPII', 144);
  480. INSERT INTO employee_project (proj_id, emp_no) VALUES ('DGPII', 113);
  481. INSERT INTO employee_project (proj_id, emp_no) VALUES ('DGPII', 24);
  482. INSERT INTO employee_project (proj_id, emp_no) VALUES ('VBASE', 8);
  483. INSERT INTO employee_project (proj_id, emp_no) VALUES ('VBASE', 136);
  484. INSERT INTO employee_project (proj_id, emp_no) VALUES ('VBASE', 15);
  485. INSERT INTO employee_project (proj_id, emp_no) VALUES ('VBASE', 71);
  486. INSERT INTO employee_project (proj_id, emp_no) VALUES ('VBASE', 145);
  487. INSERT INTO employee_project (proj_id, emp_no) VALUES ('VBASE', 44);
  488. INSERT INTO employee_project (proj_id, emp_no) VALUES ('VBASE', 4);
  489. INSERT INTO employee_project (proj_id, emp_no) VALUES ('VBASE', 83);
  490. INSERT INTO employee_project (proj_id, emp_no) VALUES ('VBASE', 138);
  491. INSERT INTO employee_project (proj_id, emp_no) VALUES ('VBASE', 45);
  492. INSERT INTO employee_project (proj_id, emp_no) VALUES ('GUIDE', 20);
  493. INSERT INTO employee_project (proj_id, emp_no) VALUES ('GUIDE', 24);
  494. INSERT INTO employee_project (proj_id, emp_no) VALUES ('GUIDE', 113);
  495. INSERT INTO employee_project (proj_id, emp_no) VALUES ('GUIDE', 8);
  496. INSERT INTO employee_project (proj_id, emp_no) VALUES ('MAPDB', 4);
  497. INSERT INTO employee_project (proj_id, emp_no) VALUES ('MAPDB', 71);
  498. INSERT INTO employee_project (proj_id, emp_no) VALUES ('MKTPR', 46);
  499. INSERT INTO employee_project (proj_id, emp_no) VALUES ('MKTPR', 105);
  500. INSERT INTO employee_project (proj_id, emp_no) VALUES ('MKTPR', 12);
  501. INSERT INTO employee_project (proj_id, emp_no) VALUES ('MKTPR', 85);
  502. INSERT INTO employee_project (proj_id, emp_no) VALUES ('MKTPR', 110);
  503. INSERT INTO employee_project (proj_id, emp_no) VALUES ('MKTPR', 34);
  504. INSERT INTO employee_project (proj_id, emp_no) VALUES ('MKTPR', 8);
  505. INSERT INTO employee_project (proj_id, emp_no) VALUES ('MKTPR', 14);
  506. INSERT INTO employee_project (proj_id, emp_no) VALUES ('MKTPR', 52);
  507. COMMIT;
  508. /*
  509. * Add project budget planning by department.
  510. * Head count array is not added here.
  511. */
  512. INSERT INTO proj_dept_budget (fiscal_year, proj_id, dept_no, projected_budget) VALUES
  513. (1994, 'GUIDE', '100', 200000);
  514. /* head count: 1,1,1,0 */
  515. INSERT INTO proj_dept_budget (fiscal_year, proj_id, dept_no, projected_budget) VALUES
  516. (1994, 'GUIDE', '671', 450000);
  517. /* head count: 3,2,1,0 */
  518. INSERT INTO proj_dept_budget (fiscal_year, proj_id, dept_no, projected_budget) VALUES
  519. (1993, 'MAPDB', '621', 20000);
  520. /* head count: 0,0,0,1 */
  521. INSERT INTO proj_dept_budget (fiscal_year, proj_id, dept_no, projected_budget) VALUES
  522. (1994, 'MAPDB', '621', 40000);
  523. /* head count: 2,1,0,0 */
  524. INSERT INTO proj_dept_budget (fiscal_year, proj_id, dept_no, projected_budget) VALUES
  525. (1994, 'MAPDB', '622', 60000);
  526. /* head count: 1,1,0,0 */
  527. INSERT INTO proj_dept_budget (fiscal_year, proj_id, dept_no, projected_budget) VALUES
  528. (1994, 'MAPDB', '671', 11000);
  529. /* head count: 1,1,0,0 */
  530. INSERT INTO proj_dept_budget (fiscal_year, proj_id, dept_no, projected_budget) VALUES
  531. (1994, 'HWRII', '670', 20000);
  532. /* head count: 1,1,1,1 */
  533. INSERT INTO proj_dept_budget (fiscal_year, proj_id, dept_no, projected_budget) VALUES
  534. (1994, 'HWRII', '621', 400000);
  535. /* head count: 2,3,2,1 */
  536. INSERT INTO proj_dept_budget (fiscal_year, proj_id, dept_no, projected_budget) VALUES
  537. (1994, 'HWRII', '622', 100000);
  538. /* head count: 1,1,2,2 */
  539. INSERT INTO proj_dept_budget (fiscal_year, proj_id, dept_no, projected_budget) VALUES
  540. (1994, 'MKTPR', '623', 80000);
  541. /* head count: 1,1,1,2 */
  542. INSERT INTO proj_dept_budget (fiscal_year, proj_id, dept_no, projected_budget) VALUES
  543. (1994, 'MKTPR', '672', 100000);
  544. /* head count: 1,1,1,2 */
  545. INSERT INTO proj_dept_budget (fiscal_year, proj_id, dept_no, projected_budget) VALUES
  546. (1994, 'MKTPR', '100', 1000000);
  547. /* head count: 4,5,6,6 */
  548. INSERT INTO proj_dept_budget (fiscal_year, proj_id, dept_no, projected_budget) VALUES
  549. (1994, 'MKTPR', '110', 200000);
  550. /* head count: 2,2,0,3 */
  551. INSERT INTO proj_dept_budget (fiscal_year, proj_id, dept_no, projected_budget) VALUES
  552. (1994, 'MKTPR', '000', 100000);
  553. /* head count: 1,1,2,2 */
  554. INSERT INTO proj_dept_budget (fiscal_year, proj_id, dept_no, projected_budget) VALUES
  555. (1995, 'MKTPR', '623', 1200000);
  556. /* head count: 7,7,4,4 */
  557. INSERT INTO proj_dept_budget (fiscal_year, proj_id, dept_no, projected_budget) VALUES
  558. (1995, 'MKTPR', '672', 800000);
  559. /* head count: 2,3,3,3 */
  560. INSERT INTO proj_dept_budget (fiscal_year, proj_id, dept_no, projected_budget) VALUES
  561. (1995, 'MKTPR', '100', 2000000);
  562. /* head count: 4,5,6,6 */
  563. INSERT INTO proj_dept_budget (fiscal_year, proj_id, dept_no, projected_budget) VALUES
  564. (1995, 'MKTPR', '110', 1200000);
  565. /* head count: 1,1,1,1 */
  566. INSERT INTO proj_dept_budget (fiscal_year, proj_id, dept_no, projected_budget) VALUES
  567. (1994, 'VBASE', '621', 1900000);
  568. /* head count: 4,5,5,3 */
  569. INSERT INTO proj_dept_budget (fiscal_year, proj_id, dept_no, projected_budget) VALUES
  570. (1995, 'VBASE', '621', 900000);
  571. /* head count: 4,3,2,2 */
  572. INSERT INTO proj_dept_budget (fiscal_year, proj_id, dept_no, projected_budget) VALUES
  573. (1994, 'VBASE', '622', 400000);
  574. /* head count: 2,2,2,1 */
  575. INSERT INTO proj_dept_budget (fiscal_year, proj_id, dept_no, projected_budget) VALUES
  576. (1994, 'VBASE', '100', 300000);
  577. /* head count: 1,1,2,3 */
  578. INSERT INTO proj_dept_budget (fiscal_year, proj_id, dept_no, projected_budget) VALUES
  579. (1995, 'VBASE', '100', 1500000);
  580. /* head count: 3,3,1,1 */
  581. INSERT INTO proj_dept_budget (fiscal_year, proj_id, dept_no, projected_budget) VALUES
  582. (1996, 'VBASE', '100', 150000);
  583. /* head count: 1,1,0,0 */
  584. COMMIT;
  585. /*
  586. * Add a few customer records.
  587. */
  588. INSERT INTO customer
  589. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  590. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  591. (1001, 'Signature Design', 'Dale J.', 'Little', '(619) 530-2710',
  592. '15500 Pacific Heights Blvd.', null, 'San Diego', 'CA', 'USA', '92121', null);
  593. INSERT INTO customer
  594. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  595. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  596. (1002, 'Dallas Technologies', 'Glen', 'Brown', '(214) 960-2233',
  597. 'P. O. Box 47000', null, 'Dallas', 'TX', 'USA', '75205', null);
  598. INSERT INTO customer
  599. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  600. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  601. (1003, 'Buttle, Griffith and Co.', 'James', 'Buttle', '(617) 488-1864',
  602. '2300 Newbury Street', 'Suite 101', 'Boston', 'MA', 'USA', '02115', null);
  603. INSERT INTO customer
  604. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  605. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  606. (1004, 'Central Bank', 'Elizabeth', 'Brocket', '61 211 99 88',
  607. '66 Lloyd Street', null, 'Manchester', null, 'England', 'M2 3LA', null);
  608. INSERT INTO customer
  609. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  610. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  611. (1005, 'DT Systems, LTD.', 'Tai', 'Wu', '(852) 850 43 98',
  612. '400 Connaught Road', null, 'Central Hong Kong', null, 'Hong Kong', null, null);
  613. INSERT INTO customer
  614. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  615. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  616. (1006, 'DataServe International', 'Tomas', 'Bright', '(613) 229 3323',
  617. '2000 Carling Avenue', 'Suite 150', 'Ottawa', 'ON', 'Canada', 'K1V 9G1', null);
  618. INSERT INTO customer
  619. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  620. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  621. (1007, 'Mrs. Beauvais', null, 'Mrs. Beauvais', null,
  622. 'P.O. Box 22743', null, 'Pebble Beach', 'CA', 'USA', '93953', null);
  623. INSERT INTO customer
  624. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  625. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  626. (1008, 'Anini Vacation Rentals', 'Leilani', 'Briggs', '(808) 835-7605',
  627. '3320 Lawai Road', null, 'Lihue', 'HI', 'USA', '96766', null);
  628. INSERT INTO customer
  629. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  630. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  631. (1009, 'Max', 'Max', null, '22 01 23',
  632. '1 Emerald Cove', null, 'Turtle Island', null, 'Fiji', null, null);
  633. INSERT INTO customer
  634. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  635. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  636. (1010, 'MPM Corporation', 'Miwako', 'Miyamoto', '3 880 77 19',
  637. '2-64-7 Sasazuka', null, 'Tokyo', null, 'Japan', '150', null);
  638. INSERT INTO customer
  639. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  640. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  641. (1011, 'Dynamic Intelligence Corp', 'Victor', 'Granges', '01 221 16 50',
  642. 'Florhofgasse 10', null, 'Zurich', null, 'Switzerland', '8005', null);
  643. INSERT INTO customer
  644. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  645. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  646. (1012, '3D-Pad Corp.', 'Michelle', 'Roche', '1 43 60 61',
  647. '22 Place de la Concorde', null, 'Paris', null, 'France', '75008', null);
  648. INSERT INTO customer
  649. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  650. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  651. (1013, 'Lorenzi Export, Ltd.', 'Andreas', 'Lorenzi', '02 404 6284',
  652. 'Via Eugenia, 15', null, 'Milan', null, 'Italy', '20124', null);
  653. INSERT INTO customer
  654. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  655. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  656. (1014, 'Dyno Consulting', 'Greta', 'Hessels', '02 500 5940',
  657. 'Rue Royale 350', null, 'Brussels', null, 'Belgium', '1210', null);
  658. INSERT INTO customer
  659. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  660. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  661. (1015, 'GeoTech Inc.', 'K.M.', 'Neppelenbroek', '(070) 44 91 18',
  662. 'P.0.Box 702', null, 'Den Haag', null, 'Netherlands', '2514', null);
  663. COMMIT;
  664. SET GENERATOR cust_no_gen to 1015;
  665. /*
  666. * Add some sales records.
  667. */
  668. INSERT INTO sales
  669. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  670. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  671. ('V91E0210', 1004, 11, '03/04/91', '03/05/91', null,
  672. 'shipped', 'y', 10, 5000, 0.1, 'hardware');
  673. INSERT INTO sales
  674. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  675. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  676. ('V92E0340', 1004, 11, '10/15/92', '10/16/92', '10/17/92',
  677. 'shipped', 'y', 7, 70000, 0, 'hardware');
  678. INSERT INTO sales
  679. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  680. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  681. ('V92J1003', 1010, 61, '07/26/92', '08/04/92', '09/15/92',
  682. 'shipped', 'y', 15, 2985, 0, 'software');
  683. INSERT INTO sales
  684. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  685. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  686. ('V93J2004', 1010, 118, '10/30/93', '12/02/93', '11/15/93',
  687. 'shipped', 'y', 3, 210, 0, 'software');
  688. INSERT INTO sales
  689. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  690. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  691. ('V93J3100', 1010, 118, '08/20/93', '08/20/93', null,
  692. 'shipped', 'y', 16, 18000.40, 0.10, 'software');
  693. INSERT INTO sales
  694. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  695. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  696. ('V92F3004', 1012, 11, '10/15/92', '01/16/93', '01/16/93',
  697. 'shipped', 'y', 3, 2000, 0, 'software');
  698. INSERT INTO sales
  699. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  700. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  701. ('V93F3088', 1012, 134, '08/27/93', '09/08/93', null,
  702. 'shipped', 'n', 10, 10000, 0, 'software');
  703. INSERT INTO sales
  704. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  705. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  706. ('V93F2030', 1012, 134, '12/12/93', null, null,
  707. 'open', 'y', 15, 450000.49, 0, 'hardware');
  708. INSERT INTO sales
  709. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  710. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  711. ('V93F2051', 1012, 134, '12/18/93', null, '03/01/94',
  712. 'waiting', 'n', 1, 999.98, 0, 'software');
  713. INSERT INTO sales
  714. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  715. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  716. ('V93H0030', 1005, 118, '12/12/93', null, '01/01/94',
  717. 'open', 'y', 20, 5980, 0.20, 'software');
  718. INSERT INTO sales
  719. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  720. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  721. ('V94H0079', 1005, 61, '02/13/94', null, '04/20/94',
  722. 'open', 'n', 10, 9000, 0.05, 'software');
  723. INSERT INTO sales
  724. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  725. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  726. ('V9324200', 1001, 72, '08/09/93', '08/09/93', '08/17/93',
  727. 'shipped', 'y', 1000, 560000, 0.20, 'hardware');
  728. INSERT INTO sales
  729. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  730. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  731. ('V9324320', 1001, 127, '08/16/93', '08/16/93', '09/01/93',
  732. 'shipped', 'y', 1, 0, 1, 'software');
  733. INSERT INTO sales
  734. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  735. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  736. ('V9320630', 1001, 127, '12/12/93', null, '12/15/93',
  737. 'open', 'n', 3, 60000, 0.20, 'hardware');
  738. INSERT INTO sales
  739. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  740. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  741. ('V9420099', 1001, 127, '01/17/94', null, '06/01/94',
  742. 'open', 'n', 100, 3399.15, 0.15, 'software');
  743. INSERT INTO sales
  744. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  745. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  746. ('V9427029', 1001, 127, '02/07/94', '02/10/94', '02/10/94',
  747. 'shipped', 'n', 17, 422210.97, 0, 'hardware');
  748. INSERT INTO sales
  749. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  750. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  751. ('V9333005', 1002, 11, '02/03/93', '03/03/93', null,
  752. 'shipped', 'y', 2, 600.50, 0, 'software');
  753. INSERT INTO sales
  754. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  755. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  756. ('V9333006', 1002, 11, '04/27/93', '05/02/93', '05/02/93',
  757. 'shipped', 'n', 5, 20000, 0, 'other');
  758. INSERT INTO sales
  759. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  760. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  761. ('V9336100', 1002, 11, '12/27/93', '01/01/94', '01/01/94',
  762. 'waiting', 'n', 150, 14850, 0.05, 'software');
  763. INSERT INTO sales
  764. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  765. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  766. ('V9346200', 1003, 11, '12/31/93', null, '01/24/94',
  767. 'waiting', 'n', 3, 0, 1, 'software');
  768. INSERT INTO sales
  769. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  770. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  771. ('V9345200', 1003, 11, '11/11/93', '12/02/93', '12/01/93',
  772. 'shipped', 'y', 900, 27000, 0.30, 'software');
  773. INSERT INTO sales
  774. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  775. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  776. ('V9345139', 1003, 127, '09/09/93', '09/20/93', '10/01/93',
  777. 'shipped', 'y', 20, 12582.12, 0.10, 'software');
  778. INSERT INTO sales
  779. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  780. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  781. ('V93C0120', 1006, 72, '03/22/93', '05/31/93', '04/17/93',
  782. 'shipped', 'y', 1, 47.50, 0, 'other');
  783. INSERT INTO sales
  784. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  785. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  786. ('V93C0990', 1006, 72, '08/09/93', '09/02/93', null,
  787. 'shipped', 'y', 40, 399960.50, 0.10, 'hardware');
  788. INSERT INTO sales
  789. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  790. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  791. ('V9456220', 1007, 127, '01/04/94', null, '01/30/94',
  792. 'open', 'y', 1, 3999.99, 0, 'hardware');
  793. INSERT INTO sales
  794. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  795. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  796. ('V93S4702', 1011, 121, '10/27/93', '10/28/93', '12/15/93',
  797. 'shipped', 'y', 4, 120000, 0, 'hardware');
  798. INSERT INTO sales
  799. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  800. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  801. ('V94S6400', 1011, 141, '01/06/94', null, '02/15/94',
  802. 'waiting', 'y', 20, 1980.72, 0.40, 'software');
  803. INSERT INTO sales
  804. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  805. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  806. ('V93H3009', 1008, 61, '08/01/93', '12/02/93', '12/01/93',
  807. 'shipped', 'n', 3, 9000, 0.05, 'software');
  808. INSERT INTO sales
  809. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  810. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  811. ('V93H0500', 1008, 61, '12/12/93', null, '12/15/93',
  812. 'open', 'n', 3, 16000, 0.20, 'hardware');
  813. INSERT INTO sales
  814. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  815. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  816. ('V93F0020', 1009, 61, '10/10/93', '11/11/93', '11/11/93',
  817. 'shipped', 'n', 1, 490.69, 0, 'software');
  818. INSERT INTO sales
  819. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  820. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  821. ('V93I4700', 1013, 121, '10/27/93', null, '12/15/93',
  822. 'open', 'n', 5, 2693, 0, 'hardware');
  823. INSERT INTO sales
  824. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  825. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  826. ('V93B1002', 1014, 134, '09/20/93', '09/21/93', '09/25/93',
  827. 'shipped', 'y', 1, 100.02, 0, 'software');
  828. INSERT INTO sales
  829. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  830. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  831. ('V93N5822', 1015, 134, '12/18/93', '01/14/94', null,
  832. 'shipped', 'n', 2, 1500.00, 0, 'software');
  833. COMMIT;
  834. /*
  835. * Put some customers on-hold.
  836. */
  837. UPDATE customer SET on_hold = '*' WHERE cust_no = 1002;
  838. UPDATE customer SET on_hold = '*' WHERE cust_no = 1009;
  839. COMMIT;