This Data in SQL workbench does not work, can someone help me -- Create Company Database CREATE DATABASE Company; -- Use above created Database USE Company; -- Create Customer Table CREATE TABLE Customers ( [Last Name] varchar(255), [First Name] varchar(255), Address varchar(255), City varchar(255), State varchar(100), ZIP int, Tel varchar(100) ); -- Insert data into Customers Table INSERT INTO Customers VALUES ('Smith','Alex','2 South ST','Newark','NJ',07104,'9174251243'), ('Boden','Paul','21 North St','Bergen','NJ',07047,'9083421987'), ('Price','Mary','Apt 3, 11th Ave','NY','NY',10074,'2128137658'), ('Burton','Jane','7 Maple Ave','Tampa','FL',33605,'8132341956'), ('Wang','Jeff','20 Northern BLVD','LA','CA',90006,'2134314356'); -- Create Products Table CREATE TABLE Products ( [Product Name] varchar(255), Category varchar(255), Price float, Quantity int, Received date ); -- Insert data into Products Table INSERT INTO Products VALUES ('3D Printer','Technology',765.78,12,'2020-01-23'), ('X-Chair','Furniture',234.59,17,'2020-01-20'), ('Design Box','Supply',23.12,200,'2020-02-12'), ('ConfiTalk','Technology',235.99,27,'2020-03-01'), ('ConTour Desk','Furniture',278.89,45,'2020-03-12'), ('ArtBox','Supply',16.67,123,'2020-03-18'), ('ConTour Chair','Furniture',189.89,29,'2020-02-15'); -- Create Recorded Orders Table CREATE TABLE [Recorded Orders] ( [Last Name] varchar(255), [First Name] varchar(255), Item varchar(255), Quantity int, Price float, [Sale Time] date, [Sale Rep] varchar(255) ); -- Insert data into Recorded Orders Table INSERT INTO [Recorded Orders] VALUES ('Smith','Alex','3D Printer',1,765.78,'2022-02-22','Mark'), ('Smith','Alex','ArtBox',2,16.67,'2022-02-22','Mark'), ('Price','Mary','Design Box',3,19.99,'2022-03-17','Sandy'), ('Wang','Jeff','ConTour Chair',1,189.89,'2022-03-25','Sandy'), ('Wang','Jeff','ConTour Chair',1,278.89,'2022-03-21','Mark'), ('Burton','Jane','ConTour Chair',1,189.89,'2022-02-27','April'); -- Create Employees Table CREATE TABLE Employees ( [Last Name] varchar(255), [First Name] varchar(255), [Hire Date] date, [Current] varchar(1), Salary float, Age int, Manager varchar(255) ); -- Insert data into Employees Table INSERT INTO Employees VALUES ('Cuban','Mark','2018-11-20','Y',54555.78,27,'April'), ('Gonzalez','Roger','2015-02-19','N',45000.56,38,'April'), ('Gonzalez','Dave','2017-06-30','Y',65332.77,45,''), ('Lu','April','2017-08-20','Y',58784.34,37,'Dave'), ('Davis','Sandy','2019-02-12','Y',50020.45,34,'April');
This Data in SQL workbench does not work, can someone help me
-- Create Company
CREATE DATABASE Company;
-- Use above created Database
USE Company;
-- Create Customer Table
CREATE TABLE Customers (
[Last Name] varchar(255),
[First Name] varchar(255),
Address varchar(255),
City varchar(255),
State varchar(100),
ZIP int,
Tel varchar(100)
);
-- Insert data into Customers Table
INSERT INTO Customers VALUES
('Smith','Alex','2 South ST','Newark','NJ',07104,'9174251243'),
('Boden','Paul','21 North St','Bergen','NJ',07047,'9083421987'),
('Price','Mary','Apt 3, 11th Ave','NY','NY',10074,'2128137658'),
('Burton','Jane','7 Maple Ave','Tampa','FL',33605,'8132341956'),
('Wang','Jeff','20 Northern BLVD','LA','CA',90006,'2134314356');
-- Create Products Table
CREATE TABLE Products (
[Product Name] varchar(255),
Category varchar(255),
Price float,
Quantity int,
Received date
);
-- Insert data into Products Table
INSERT INTO Products VALUES
('3D Printer','Technology',765.78,12,'2020-01-23'),
('X-Chair','Furniture',234.59,17,'2020-01-20'),
('Design Box','Supply',23.12,200,'2020-02-12'),
('ConfiTalk','Technology',235.99,27,'2020-03-01'),
('ConTour Desk','Furniture',278.89,45,'2020-03-12'),
('ArtBox','Supply',16.67,123,'2020-03-18'),
('ConTour Chair','Furniture',189.89,29,'2020-02-15');
-- Create Recorded Orders Table
CREATE TABLE [Recorded Orders] (
[Last Name] varchar(255),
[First Name] varchar(255),
Item varchar(255),
Quantity int,
Price float,
[Sale Time] date,
[Sale Rep] varchar(255)
);
-- Insert data into Recorded Orders Table
INSERT INTO [Recorded Orders] VALUES
('Smith','Alex','3D Printer',1,765.78,'2022-02-22','Mark'),
('Smith','Alex','ArtBox',2,16.67,'2022-02-22','Mark'),
('Price','Mary','Design Box',3,19.99,'2022-03-17','Sandy'),
('Wang','Jeff','ConTour Chair',1,189.89,'2022-03-25','Sandy'),
('Wang','Jeff','ConTour Chair',1,278.89,'2022-03-21','Mark'),
('Burton','Jane','ConTour Chair',1,189.89,'2022-02-27','April');
-- Create Employees Table
CREATE TABLE Employees (
[Last Name] varchar(255),
[First Name] varchar(255),
[Hire Date] date,
[Current] varchar(1),
Salary float,
Age int,
Manager varchar(255)
);
-- Insert data into Employees Table
INSERT INTO Employees VALUES
('Cuban','Mark','2018-11-20','Y',54555.78,27,'April'),
('Gonzalez','Roger','2015-02-19','N',45000.56,38,'April'),
('Gonzalez','Dave','2017-06-30','Y',65332.77,45,''),
('Lu','April','2017-08-20','Y',58784.34,37,'Dave'),
('Davis','Sandy','2019-02-12','Y',50020.45,34,'April');
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 4 images