-
Notifications
You must be signed in to change notification settings - Fork 0
/
Car_dealership_insert.sql
145 lines (122 loc) · 1.46 KB
/
Car_dealership_insert.sql
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
131
132
133
134
135
136
137
138
139
140
INSERT INTO customer (
last_name,
first_name,
phone_number,
email,
address,
city,
state,
zip_code
) VALUES (
'Brink',
'Gabby',
'415-777-9876',
'gabby@aol.com',
'123 Tell St',
'Amazing Town',
'FL',
'12385'
);
SELECT *
FROM customer
INSERT INTO service_technician(
last_name,
first_name
) VALUES (
'Smith',
'Billy');
SELECT *
FROM service_technician
INSERT INTO service_ticket(
service_ticket_number,
date_received,
date_returned,
comments_,
car_id,
customer_id,
service_tech_id
)VALUES (
'S987',
'2023-11-08 17:36:00',
'2023-11-10 17:37:00',
'Oil change and routine maintence.',
'1',
'1',
'1');
SELECT *
FROM service_ticket
INSERT INTO sales_person(
last_name,
first_name) VALUES(
'Doe',
'John');
SELECT *
FROM sales_person
INSERT INTO pos(
invoice_number,
date_,
total,
car_id,
customer_id,
salesperson_id,
service_ticket_id)VALUES(
'09999',
'2023-11-10 18:03:00',
'300.80',
'1',
'1',
'1',
'1'
);
SELECT *
FROM pos
INSERT INTO service(
service_name,
rate,
service_ticket_id,
part_id
)VALUES (
'Oil Change',
'50.00',
'1',
'1');
SELECT *
FROM service
INSERT INTO car(
vin,
make,
model,
year_,
color,
mileage,
new_,
sales_price)VALUES(
'12345678901234567',
'Nissan',
'Pathfinder',
'2015',
'Blue',
'70000',
'False',
'10000.00');
SELECT *
FROM car
INSERT INTO payment(
payment_method,
customer_id
)VALUES(
'Visa',
'1');
SELECT *
FROM payment
INSERT INTO parts(
part_number,
description,
price,
quantity) VALUES (
'56576567',
'Oil Filter',
'10.00',
'1');
SELECT *
FROM parts