-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBamazon.sql
More file actions
36 lines (34 loc) · 1.45 KB
/
Copy pathBamazon.sql
File metadata and controls
36 lines (34 loc) · 1.45 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
-- Create a database called 'Bamazon' and switch into it for this activity --
CREATE DATABASE Bamazon;
USE Bamazon;
-- Create a table called 'products' which will contain the store inventory --
CREATE TABLE products (
item_id INTEGER(11) AUTO_INCREMENT NOT NULL,
product_name VARCHAR(30) NOT NULL,
department_name VARCHAR(20) NOT NULL,
price DECIMAL(10,2) NOT NULL,
stock_quantity INTEGER(11) NOT NULL,
PRIMARY KEY (item_id)
);
-- Insert data into the 'products' table --
INSERT INTO products (product_name, department_name, price, stock_quantity)
VALUES ('Dove Shampoo', 'Cosmetics', 5.75, 500),
('Dove Conditioner', 'Cosmetics', 6.25, 627),
('Glad 12 Gal Trash Bags', 'Grocery', 5.99, 300),
('Brawny Paper Towels', 'Grocery', 4.25, 400),
('Granny Smith Apples', 'Produce', 0.35, 800),
('Chiquita Bannana', 'Produce', 0.20, 10000),
('Tropicana Orange Juice', 'Grocery', 4.45, 267),
('Horizon Organic Milk', 'Grocery', 4.50, 200),
('Huggies Diapers', 'Children', 2.75, 476),
('Charmin Toiler Paper', 'Grocery', 12.99, 575),
('Pampers Baby Wipes', 'Children', 1.50, 423),
('Yoga Mat', 'Sports', 12.75, 150),
('5lb Dumb bell', 'Sports', 7.99, 89),
('Tie Dye Shirt', 'Clothing', 5.55, 120),
('Nike Shorts', 'Clothing', 17.88, 250),
('Purina Cat Chow', 'Pet', 7.25, 157),
('Fancy Feast Wet Cat Food', 'Pet', 12.50, 163),
('Ibuprophen', 'Pharmacy', 4.95, 389),
('Band Aid', 'Pharmacy', 3.25, 550),
('Ben & Jerry Ice Cream', 'Grocery', 3.25, 432);