1
+ -- AUTHOR: Eric MIlgram, PhD
2
+ --
3
+ -- DATE: 09 Dec 2021
4
+ --
5
+ -- PURPOSE
6
+ -- The purpose of these SQL statements is to insert record data
7
+ -- into the 'company', 'position', 'employee', and 'job' tables in
8
+ -- the 'dev' schema for the PostgreSQL database used for the
9
+ -- Paylocity Coding Challenge.
10
+ --
11
+ -- ############################################################################
12
+ -- Be sure to set the correct value for the schema.
13
+ -- ############################################################################
14
+ SET search_path TO dev;
15
+
16
+
17
+ -- ############################################################################
18
+ -- Start the transaction before any inserts and only commit it if all
19
+ -- inserts work properly.
20
+ -- ############################################################################
21
+ BEGIN TRANSACTION;
22
+
23
+ INSERT INTO Company
24
+ (guid, name, status)
25
+ VALUES
26
+ (' {4c948630-bce9-4aae-ae6d-9898f3539dab}' , ' My Test Company 1' , 1 ),
27
+ (' {78bffbd2-c6db-441f-b981-f92813e1791b}' , ' My Test Company 2' , 1 ),
28
+ (' {ab447037-2255-4882-826b-56f598baba71}' , ' My Test Company 3' , 1 ),
29
+ (' {5a2d1bf8-9367-4f07-9643-64e08dd0e874}' , ' My Test Company 4' , 1 ),
30
+ (' {38a41864-38b6-4a28-b742-5f5ecfe6ad17}' , ' My Test Company 5' , 1 );
31
+
32
+ INSERT INTO Position
33
+ (guid, name, status)
34
+ VALUES
35
+ (' {0550f13e-76d0-4b8e-99bf-fb3f16429f9b}' , ' Data Scientist 1' , 1 ),
36
+ (' {5b22cf08-a93e-4457-a869-203cc1e6370e}' , ' Data Scientist 2' , 1 ),
37
+ (' {5781d41f-cc64-469b-aba8-637b0204a096}' , ' Data Scientist 3' , 1 ),
38
+ (' {041ce313-3b4e-40ca-bcc7-4ba348a60d85}' , ' Business Analyst 1' , 1 ),
39
+ (' {b8121811-ca23-4209-a981-20651ec16200}' , ' Business Analyst 2' , 1 ),
40
+ (' {df4e534f-82e7-46b2-be90-5829e26eb5bb}' , ' Program Manager 1' , 1 ),
41
+ (' {db7e3090-38bc-49bd-803c-d047be20600c}' , ' Program Manager 2' , 1 ),
42
+ (' {7325831e-7701-42d7-87a0-bdc144cf0558}' , ' Systems Architect 1' , 1 ),
43
+ (' {e1b37547-5899-46cd-8af5-2bcf421d0a43}' , ' Systems Architect 2' , 1 );
44
+
45
+ INSERT INTO Employee
46
+ (guid, state, status)
47
+ VALUES
48
+ (' {1d1ca01f-1ada-4463-817b-79e15ffd9875}' , ' NY' , 3 ),
49
+ (' {d0d46dba-e96e-4401-b4d9-d8c8c3e7119e}' , ' MN' , 1 ),
50
+ (' {13ef8f03-daa0-46a0-8b66-720ea84bc12f}' , ' CA' , 1 ),
51
+ (' {5908c141-12d1-4ff5-9f8f-12c1ef71f430}' , ' IA' , 3 ),
52
+ (' {88f9ddd6-cfa1-4201-9268-4c0dcff9c017}' , ' LA' , 1 ),
53
+ (' {d9537cf4-02a6-4900-805c-cd214a31a6e8}' , ' GA' , 3 ),
54
+ (' {baa94efd-fea0-4065-b0f1-98cd1a74a8bf}' , ' CA' , 2 ),
55
+ (' {e6878e0a-a8b9-40cc-b73b-530096c7401d}' , ' IL' , 2 );
56
+
57
+ INSERT INTO JOB
58
+ (guid, company_guid, position_guid, employee_guid)
59
+ VALUES
60
+ (' {75db0af2-ef36-4c9d-a7c1-0549eb3e24e9}' , ' {78bffbd2-c6db-441f-b981-f92813e1791b}' , ' {df4e534f-82e7-46b2-be90-5829e26eb5bb}' , ' {1d1ca01f-1ada-4463-817b-79e15ffd9875}' ),
61
+ (' {2ee639aa-035a-4dfe-a3ed-e11d5a4b6a30}' , ' {4c948630-bce9-4aae-ae6d-9898f3539dab}' , ' {df4e534f-82e7-46b2-be90-5829e26eb5bb}' , ' {d0d46dba-e96e-4401-b4d9-d8c8c3e7119e}' ),
62
+ (' {adc12833-475e-4027-8fe8-d7845381b867}' , ' {4c948630-bce9-4aae-ae6d-9898f3539dab}' , ' {7325831e-7701-42d7-87a0-bdc144cf0558}' , ' {13ef8f03-daa0-46a0-8b66-720ea84bc12f}' ),
63
+ (' {caa7ba66-f120-45fb-808f-2e0e16aae2bc}' , ' {4c948630-bce9-4aae-ae6d-9898f3539dab}' , ' {5781d41f-cc64-469b-aba8-637b0204a096}' , ' {5908c141-12d1-4ff5-9f8f-12c1ef71f430}' ),
64
+ (' {5f6cdd10-de9c-430a-9143-45b79eba7e44}' , ' {5a2d1bf8-9367-4f07-9643-64e08dd0e874}' , ' {7325831e-7701-42d7-87a0-bdc144cf0558}' , ' {88f9ddd6-cfa1-4201-9268-4c0dcff9c017}' ),
65
+ (' {9347dea5-fcfa-48e1-8efd-af486d0fe575}' , ' {78bffbd2-c6db-441f-b981-f92813e1791b}' , ' {b8121811-ca23-4209-a981-20651ec16200}' , ' {d9537cf4-02a6-4900-805c-cd214a31a6e8}' ),
66
+ (' {f36be466-2b5b-4404-a864-8de1dea27f10}' , ' {38a41864-38b6-4a28-b742-5f5ecfe6ad17}' , ' {5781d41f-cc64-469b-aba8-637b0204a096}' , ' {baa94efd-fea0-4065-b0f1-98cd1a74a8bf}' ),
67
+ (' {240fecb7-b6eb-4f33-b526-ba65cc097c43}' , ' {78bffbd2-c6db-441f-b981-f92813e1791b}' , ' {041ce313-3b4e-40ca-bcc7-4ba348a60d85}' , ' {e6878e0a-a8b9-40cc-b73b-530096c7401d}' );
68
+
69
+ COMMIT TRANSACTION;
0 commit comments