-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsample_data.sql
More file actions
130 lines (113 loc) · 4.84 KB
/
Copy pathsample_data.sql
File metadata and controls
130 lines (113 loc) · 4.84 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
-- ===========================================
-- E-Commerce Database Management System
-- File: sample_data.sql
-- Description: Sample Data
-- ===========================================
USE EcommerceDB;
-- ===========================================
-- Categories
-- ===========================================
INSERT INTO Categories (category_name) VALUES
('Electronics'),
('Fashion'),
('Home Appliances'),
('Books'),
('Sports');
-- ===========================================
-- Customers
-- ===========================================
INSERT INTO Customers (first_name, last_name, email, phone, city, state) VALUES
('Rahul','Sharma','rahul.sharma@gmail.com','9876543210','Hyderabad','Telangana'),
('Priya','Reddy','priya.reddy@gmail.com','9876543211','Bengaluru','Karnataka'),
('Arjun','Kumar','arjun.kumar@gmail.com','9876543212','Chennai','Tamil Nadu'),
('Sneha','Gupta','sneha.gupta@gmail.com','9876543213','Delhi','Delhi'),
('Neha','Singh','neha.singh@gmail.com','9876543214','Mumbai','Maharashtra'),
('Kiran','Patel','kiran.patel@gmail.com','9876543215','Ahmedabad','Gujarat'),
('Anjali','Verma','anjali.verma@gmail.com','9876543216','Pune','Maharashtra'),
('Rohit','Mehta','rohit.mehta@gmail.com','9876543217','Jaipur','Rajasthan'),
('Pooja','Nair','pooja.nair@gmail.com','9876543218','Kochi','Kerala'),
('Vikram','Joshi','vikram.joshi@gmail.com','9876543219','Lucknow','Uttar Pradesh');
-- ===========================================
-- Products
-- ===========================================
INSERT INTO Products (product_name, category_id, brand, price, stock) VALUES
('iPhone 16',1,'Apple',80000,25),
('Galaxy S25',1,'Samsung',70000,30),
('MacBook Air M4',1,'Apple',120000,15),
('ThinkPad X1',1,'Lenovo',95000,18),
('Sony WH-1000XM6',1,'Sony',25000,40),
('Nike Running Shoes',2,'Nike',6000,50),
('Adidas Hoodie',2,'Adidas',3500,60),
('LG Refrigerator',3,'LG',55000,12),
('Atomic Habits',4,'Penguin',650,100),
('Cricket Bat',5,'SG',3500,35);
-- ===========================================
-- Orders
-- ===========================================
INSERT INTO Orders (customer_id, order_date, total_amount, order_status) VALUES
(1,'2026-06-01',80000,'Delivered'),
(2,'2026-06-02',70000,'Delivered'),
(3,'2026-06-03',120000,'Processing'),
(4,'2026-06-04',6000,'Delivered'),
(5,'2026-06-05',55000,'Shipped'),
(6,'2026-06-06',3500,'Pending'),
(7,'2026-06-07',25000,'Delivered'),
(8,'2026-06-08',3500,'Cancelled'),
(9,'2026-06-09',650,'Delivered'),
(10,'2026-06-10',95000,'Processing');
-- ===========================================
-- Order Items
-- ===========================================
INSERT INTO Order_Items (order_id, product_id, quantity, price) VALUES
(1,1,1,80000),
(2,2,1,70000),
(3,3,1,120000),
(4,6,1,6000),
(5,8,1,55000),
(6,7,1,3500),
(7,5,1,25000),
(8,10,1,3500),
(9,9,1,650),
(10,4,1,95000);
-- ===========================================
-- Payments
-- ===========================================
INSERT INTO Payments (order_id, payment_date, payment_method, payment_status, transaction_id) VALUES
(1,'2026-06-01','UPI','Success','TXN1001'),
(2,'2026-06-02','Credit Card','Success','TXN1002'),
(3,'2026-06-03','Debit Card','Pending','TXN1003'),
(4,'2026-06-04','UPI','Success','TXN1004'),
(5,'2026-06-05','Net Banking','Success','TXN1005'),
(6,'2026-06-06','Cash on Delivery','Pending','TXN1006'),
(7,'2026-06-07','UPI','Success','TXN1007'),
(8,'2026-06-08','Credit Card','Refunded','TXN1008'),
(9,'2026-06-09','UPI','Success','TXN1009'),
(10,'2026-06-10','Debit Card','Pending','TXN1010');
-- ===========================================
-- Shipping
-- ===========================================
INSERT INTO Shipping (order_id, courier_name, tracking_number, shipping_status, delivery_date) VALUES
(1,'Blue Dart','BD1001','Delivered','2026-06-03'),
(2,'Delhivery','DL1002','Delivered','2026-06-04'),
(3,'DTDC','DT1003','In Transit','2026-06-08'),
(4,'Blue Dart','BD1004','Delivered','2026-06-06'),
(5,'Ekart','EK1005','Shipped','2026-06-09'),
(6,'DTDC','DT1006','Pending',NULL),
(7,'Delhivery','DL1007','Delivered','2026-06-09'),
(8,'Blue Dart','BD1008','Cancelled',NULL),
(9,'India Post','IP1009','Delivered','2026-06-11'),
(10,'Ekart','EK1010','Processing',NULL);
-- ===========================================
-- Reviews
-- ===========================================
INSERT INTO Reviews (customer_id, product_id, rating, review_text, review_date) VALUES
(1,1,5,'Excellent phone!','2026-06-05'),
(2,2,4,'Very good performance.','2026-06-06'),
(3,3,5,'Worth every rupee.','2026-06-07'),
(4,6,4,'Comfortable shoes.','2026-06-08'),
(5,8,5,'Great refrigerator.','2026-06-10'),
(6,7,3,'Good quality.','2026-06-11'),
(7,5,5,'Amazing sound quality.','2026-06-12'),
(8,10,4,'Nice bat.','2026-06-13'),
(9,9,5,'Must-read book.','2026-06-14'),
(10,4,5,'Excellent laptop.','2026-06-15');