-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathseed.sql
More file actions
93 lines (89 loc) · 4.03 KB
/
seed.sql
File metadata and controls
93 lines (89 loc) · 4.03 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
93
-- =============================================================
-- Section 8 — Seed data
-- =============================================================
-- 15 customers, 15 products, 50 orders spread over 2023-2024.
-- =============================================================
SET search_path TO sqlf_order;
INSERT INTO customer (id, first_name, last_name, country, signup_date) VALUES
(1, 'Alice', 'Anderson', 'UK', '2022-04-15'),
(2, 'Brian', 'Baker', 'USA', '2022-05-20'),
(3, 'Carla', 'Cohen', 'USA', '2022-08-10'),
(4, 'Daniel', 'Dixon', 'Canada', '2022-09-01'),
(5, 'Eva', 'Evans', 'UK', '2023-01-12'),
(6, 'Farid', 'Farouk', 'Egypt', '2023-02-20'),
(7, 'Grace', 'Garcia', 'Spain', '2023-03-15'),
(8, 'Hassan', 'Hamid', 'UAE', '2023-04-05'),
(9, 'Irene', 'Ishida', 'Japan', '2023-05-18'),
(10, 'Jon', 'Johnson', 'USA', '2023-06-22'),
(11, 'Khadija', 'Khalil', 'Morocco', '2023-07-30'),
(12, 'Luka', 'Lopez', 'Spain', '2023-09-11'),
(13, 'Maya', 'Marino', 'Italy', '2023-10-25'),
(14, 'Noah', 'Nakamura', 'Japan', '2023-11-14'),
(15, 'Olivia', 'Owens', 'UK', '2024-01-08');
INSERT INTO product (id, name, category, price) VALUES
(1, 'Laptop Pro 14', 'Electronics', 1899.00),
(2, 'Wireless Mouse', 'Electronics', 29.99),
(3, 'Mechanical Keyboard', 'Electronics', 119.00),
(4, '27" Monitor', 'Electronics', 349.99),
(5, 'USB-C Hub', 'Electronics', 49.50),
(6, 'Running Shoes', 'Footwear', 89.00),
(7, 'Trail Boots', 'Footwear', 149.99),
(8, 'Sandals', 'Footwear', 35.00),
(9, 'Clean Code', 'Books', 34.99),
(10, 'Pragmatic Programmer', 'Books', 39.99),
(11, 'Designing Data-Intensive Applications', 'Books', 44.99),
(12, 'Cotton T-Shirt', 'Clothing', 19.99),
(13, 'Denim Jeans', 'Clothing', 59.99),
(14, 'Wool Sweater', 'Clothing', 89.00),
(15, 'Winter Jacket', 'Clothing', 199.99);
INSERT INTO orders (id, customer_id, product_id, quantity, order_date, total) VALUES
(1, 1, 1, 1, '2023-02-10', 1899.00),
(2, 1, 2, 2, '2023-02-10', 59.98),
(3, 2, 1, 1, '2023-03-05', 1899.00),
(4, 2, 3, 1, '2023-03-05', 119.00),
(5, 3, 6, 2, '2023-03-18', 178.00),
(6, 3, 8, 1, '2023-03-18', 35.00),
(7, 4, 9, 3, '2023-04-01', 104.97),
(8, 4, 10, 1, '2023-04-01', 39.99),
(9, 5, 4, 2, '2023-04-15', 699.98),
(10, 5, 5, 1, '2023-04-15', 49.50),
(11, 6, 15, 1, '2023-05-02', 199.99),
(12, 6, 14, 1, '2023-05-02', 89.00),
(13, 7, 7, 1, '2023-05-20', 149.99),
(14, 7, 6, 1, '2023-05-20', 89.00),
(15, 8, 1, 1, '2023-06-03', 1899.00),
(16, 8, 2, 1, '2023-06-03', 29.99),
(17, 8, 3, 1, '2023-06-03', 119.00),
(18, 9, 11, 2, '2023-06-22', 89.98),
(19, 9, 9, 1, '2023-06-22', 34.99),
(20, 10,13, 2, '2023-07-10', 119.98),
(21, 10,12, 3, '2023-07-10', 59.97),
(22, 11,15, 1, '2023-08-01', 199.99),
(23, 11,8, 2, '2023-08-01', 70.00),
(24, 12,4, 1, '2023-08-18', 349.99),
(25, 12,2, 1, '2023-08-18', 29.99),
(26, 13,10, 2, '2023-09-05', 79.98),
(27, 13,11, 1, '2023-09-05', 44.99),
(28, 14,14, 1, '2023-09-25', 89.00),
(29, 14,6, 1, '2023-09-25', 89.00),
(30, 1, 4, 1, '2023-10-12', 349.99),
(31, 1, 15, 1, '2023-10-12', 199.99),
(32, 2, 1, 1, '2023-11-01', 1899.00),
(33, 3, 13, 1, '2023-11-15', 59.99),
(34, 3, 12, 2, '2023-11-15', 39.98),
(35, 5, 9, 1, '2023-12-02', 34.99),
(36, 6, 10, 1, '2023-12-20', 39.99),
(37, 7, 2, 3, '2024-01-05', 89.97),
(38, 8, 4, 1, '2024-01-18', 349.99),
(39, 9, 7, 1, '2024-02-02', 149.99),
(40, 10,1, 1, '2024-02-15', 1899.00),
(41, 11,3, 1, '2024-02-28', 119.00),
(42, 12,14, 1, '2024-03-10', 89.00),
(43, 13,5, 2, '2024-03-22', 99.00),
(44, 14,15, 1, '2024-04-03', 199.99),
(45, 15,1, 1, '2024-04-15', 1899.00),
(46, 15,2, 1, '2024-04-15', 29.99),
(47, 15,3, 1, '2024-04-15', 119.00),
(48, 1, 11, 1, '2024-05-02', 44.99),
(49, 2, 6, 1, '2024-05-20', 89.00),
(50, 4, 13, 2, '2024-06-01', 119.98);