0% found this document useful (0 votes)
21 views1 page

Employee Sales Table Creation Steps

The document outlines the creation of an 'EmployeeSales' table with specific columns for tracking sales data, including SaleID, EmployeeID, Department, SaleAmount, and SaleDate. It also includes a series of SQL insert statements to populate the table with sample sales records. Each record captures details about individual sales made by employees across different departments.

Uploaded by

ankity9990
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views1 page

Employee Sales Table Creation Steps

The document outlines the creation of an 'EmployeeSales' table with specific columns for tracking sales data, including SaleID, EmployeeID, Department, SaleAmount, and SaleDate. It also includes a series of SQL insert statements to populate the table with sample sales records. Each record captures details about individual sales made by employees across different departments.

Uploaded by

ankity9990
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

--Step 1) Create Table

CREATE TABLE EmployeeSales (


SaleID INT PRIMARY KEY,
EmployeeID INT,
Department VARCHAR(50),
SaleAmount DECIMAL(10, 2),
SaleDate DATE
);

--Step 2) Insert records into the table


INSERT INTO EmployeeSales (SaleID, EmployeeID, Department, SaleAmount, SaleDate)
VALUES
(1, 101, 'Electronics', 500.00, '2023-08-01'),
(2, 102, 'Electronics', 300.00, '2023-08-03'),
(3, 101, 'Furniture', 150.00, '2023-08-02'),
(4, 103, 'Electronics', 250.00, '2023-08-04'),
(5, 104, 'Furniture', 200.00, '2023-08-02'),
(6, 101, 'Furniture', 450.00, '2023-08-05'),
(7, 102, 'Electronics', 700.00, '2023-08-05'),
(8, 103, 'Furniture', 100.00, '2023-08-06');

--
***********************************************************************************
--Column Definitions

SaleID (INT PRIMARY KEY): Unique identifier for each sale.


EmployeeID (INT): Identifier for the employee who made the sale.
Department (VARCHAR(50)): Name of the department where the sale was made.
SaleAmount (DECIMAL(10, 2)): Total amount of the sale.
SaleDate (DATE): Date when the sale occurred.
--
***********************************************************************************

You might also like