-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvalue insertion
More file actions
92 lines (60 loc) · 4.06 KB
/
value insertion
File metadata and controls
92 lines (60 loc) · 4.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
--product table
--each comma represents a column and each line represents a row
INSERT INTO product VALUES('FUR-BO-10001798', 'Bush Somerset Collection Bookcase', 'Furniture', 'Bookcases', 261.96, 2, 0, 41.9136, 'CG-12520')
INSERT INTO product VALUES('OFF-LA-10000240', 'Self-Adhesive Address Labels for Typewriters by Universal', 'Office Supplies', 'Labels', 14.62, 2, 0, 6.8714, 'DV-13045')
INSERT INTO product VALUES('OFF-ST-10000760', 'Eldon Fold "N Roll Cart System', 'Office Supplies', 'Storage', 22.368, 2, 0.2, 2.5164, 'SO-20335')
INSERT INTO product VALUES('FUR-FU-10001487', 'Eldon Expressions Wood and Plastic Desk Accessories, Cherry Wood', 'Furniture', 'Furnishings', 48.86, 7, 0, 14.1694, 'BH-11710')
INSERT INTO product VALUES('OFF-PA-10002365', 'Xerox 1967', 'Office Supplies', 'Paper', 15.552, 3, 0.2, 5.4432, 'AA-10480')
INSERT INTO product VALUES('OFF-BI-10003656', 'Fellowes PB200 Plastic Comb Binding Machine', 'Office Supplies', 'Binders', 407.976, 3, 0.2, 132.5922, 'IM-15070')
INSERT INTO product VALUES('OFF-AP-10002311', 'Holmes Replacement Filter for HEPA Air Cleaner, Very Large Room', 'Office Supplies', 'Appliances', 68.81, 5, 0.8, -123.858, 'HP-14815')
INSERT INTO product VALUES('OFF-ST-10004186', 'Stur-D-Stor Shelving, Vertical 5-Shelf: 72"H x 36"W x 18 1/2"D', 'Office Supplies', 'Storage', 665.88, 6, 0, 13.3176, 'PK-19075')
INSERT INTO product VALUES('OFF-ST-10000107', 'Fellowes Super Stor/Drawer', 'Office Supplies', 'Storage', 55.5, 2, 0, 9.99, 'AG-10270')
--veiwing our progress
SELECT *
FROM product
--putting values in the customers table
INSERT INTO customer VALUES('CG-12520', 'Claire Gute', 'Henderson', 'Kentucky', 'United States', 'South', 'Consumer', 'FUR-BO-10001798', 42420
)
INSERT INTO customer VALUES('DV-13045', 'Darrin Van Huff', 'Los Angeles', 'California', 'United States', 'West', 'Corporate', 'OFF-LA-10000240', 90036
)
INSERT INTO customer VALUES('SO-20335', 'Sean O"Donnell', 'Fort Lauderdale', 'Florida', 'United States', 'South', 'Consumer', 'FUR-TA-10000577', 33311
)
INSERT INTO customer VALUES('BH-11710', 'Brosina Hoffman', 'Los Angeles', 'California', 'United States', 'West', 'Consumer', 'FUR-FU-10001487', 90032
)
INSERT INTO customer VALUES('AA-10480', 'Andrew Allen', 'Concord', 'North Carolina', 'United States', 'South', 'Consumer', 'OFF-PA-10002365', 28027
)
INSERT INTO customer VALUES('IM-15070', 'Irene Maddox', 'Seattle', 'Washington', 'United States', 'West', 'Consumer', 'OFF-BI-10003656', 98103
)
INSERT INTO customer VALUES('HP-14815', 'Harold Pawlan', 'Fort Worth', 'Texas', 'United States', 'Central', 'Home Office', 'OFF-AP-10002311', 76106
)
INSERT INTO customer VALUES('PK-19075', 'Pete Kriz', 'Madison', 'Wisconsin', 'United States', 'Central', 'Consumer', 'OFF-ST-10004186', 53711
)
INSERT INTO customer VALUES('AG-10270', 'Alejandro Grove', 'West Jordan', 'Utah', 'United States', 'West', 'Consumer', 'OFF-ST-10000107', 84084
)
--veiwing our progress
SELECT *
FROM customer
--putting values in the ORDERS TABLE
INSERT INTO orders VALUES('CA-2016-152156', '2016-08-11', 'Second Class', '2016-11-11', 'FUR-BO-10001798')
GO
INSERT INTO orders VALUES('CA-2016-138688', '06-12-2016', 'Second Class', '6-16-2016', 'OFF-LA-10000240')
GO
INSERT INTO orders VALUES('CA-2014-115812', '06-09-2014', 'Standard Class', '6-14-2014', 'OFF-ST-10000760')
GO
INSERT INTO orders VALUES('CA-2015-106320', '06-09-2014', 'Standard Class', '6-14-2014', 'OFF-PA-10002365')
GO
INSERT INTO orders VALUES('US-2015-118983', '11-22-2015', 'Standard Class', '11-26-2015', 'OFF-AP-10002311')
GO
INSERT INTO orders VALUES('CA-2016-121755', '11-22-2015', 'Standard Class', '11-26-2015', 'OFF-BI-10003656')
GO
INSERT INTO orders VALUES('CA-2014-105893', '11-11-2014', 'Standard Class', '11-18-2014', 'OFF-ST-10004186')
GO
INSERT INTO orders VALUES('CA-2014-167164', '5-13-2014', 'Second Class', '5-15-2014', 'OFF-ST-10000107')
GO
INSERT INTO orders VALUES('CA-2014-143336', '8-27-2014', 'Second Class', '09-01-2014', 'FUR-FU-10001487')
GO
--veiwing our progress
SELECT P.product_id, O.product_id
FROM product p
FULL JOIN orders o
ON o.product_id = p.product_id