empdml.sql 44 KB

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