Create the following table in your database with the following schema: Table: SalesPerson | Column Name | Туре +--- | sales id | int | varchar | | int I name | salary | commission_rate | int |...



Create the tables in sql code of the attached question ?


Create the following table in your database with the following schema:<br>Table: SalesPerson<br>| Column Name<br>| Туре<br>+---<br>| sales id<br>| int<br>| varchar |<br>| int<br>I name<br>| salary<br>| commission_rate | int<br>| hire_date<br>I date<br>+----<br>----+<br>sales_id is the primary key column<br>Each row of this table indicates the name and the ID of a salesperson<br>alongside their salary, commission rate, and hire date.<br>this table.<br>Table: Company<br>| Column Name | Type<br>| int<br>| varchar I<br>| varchar |<br>| com_id<br>| name<br>| city<br>-----+<br>com_id is the primary key column for this table.<br>Each row of this table indicates the name and the ID of a company and the<br>city in which the company is located.<br>Table: Orders<br>| Column Name | Type |<br>+-<br>| order id<br>| order date<br>| com id<br>| sales id<br>| int<br>| date |<br>| int<br>| int<br>| int<br>| amount<br>+----<br>-----+<br>order id is the primary key column for this table.<br>com id is a foreign key to com id from the Company table.<br>sales id is a foreign key to com id from the SalesPerson table.<br>Each row of this table contains information about one order. This includes<br>the ID of the company, the ID of the salesperson, the date of the order, and<br>the amount paid.<br>Add the following data to your tables:<br>

Extracted text: Create the following table in your database with the following schema: Table: SalesPerson | Column Name | Туре +--- | sales id | int | varchar | | int I name | salary | commission_rate | int | hire_date I date +---- ----+ sales_id is the primary key column Each row of this table indicates the name and the ID of a salesperson alongside their salary, commission rate, and hire date. this table. Table: Company | Column Name | Type | int | varchar I | varchar | | com_id | name | city -----+ com_id is the primary key column for this table. Each row of this table indicates the name and the ID of a company and the city in which the company is located. Table: Orders | Column Name | Type | +- | order id | order date | com id | sales id | int | date | | int | int | int | amount +---- -----+ order id is the primary key column for this table. com id is a foreign key to com id from the Company table. sales id is a foreign key to com id from the SalesPerson table. Each row of this table contains information about one order. This includes the ID of the company, the ID of the salesperson, the date of the order, and the amount paid. Add the following data to your tables:
Input:<br>SalesPerson table:<br>+----------<br>| sales id | name | salary | commission rate | hire date<br>| 1<br>| 2<br>| 3<br>| 4<br>| 5<br>| John | 100000 | 6<br>| 12000<br>| Mark | 65000<br>| 25000<br>| Alex | 5000<br>| 5<br>| 12<br>| 25<br>| 10<br>| 4/1/2006<br>| 5/1/2010<br>| 12/25/2008 I<br>| 1/1/2005<br>| 2/3/2007<br>| Amy<br>| Pam<br>+---<br>Company table:<br>+---<br>com_id | name<br>| city<br>| 1<br>| 2<br>| 3<br>| 4<br>| RED<br>| ORANGE | New York |<br>| YELLOW | Boston<br>| GREEN<br>| Boston<br>| Austin<br>+--<br>Orders table:<br>+---------<br>| order id | order date | com id | sales id | amount |<br>+--<br>-------+<br>| 1<br>| 2<br>| 3<br>| 4<br>| 1/1/2014<br>| 2/1/2014<br>| 3/1/2014<br>| 4/1/2014<br>| 3<br>| 4<br>| 1<br>| 1<br>| 4<br>| 5<br>| 1<br>| 4<br>| 10000<br>| 5000<br>| 50000<br>| 25000<br>Write an SQL query to report the names of all the salespersons who did not have any orders related<br>to the company with the name

Extracted text: Input: SalesPerson table: +---------- | sales id | name | salary | commission rate | hire date | 1 | 2 | 3 | 4 | 5 | John | 100000 | 6 | 12000 | Mark | 65000 | 25000 | Alex | 5000 | 5 | 12 | 25 | 10 | 4/1/2006 | 5/1/2010 | 12/25/2008 I | 1/1/2005 | 2/3/2007 | Amy | Pam +--- Company table: +--- com_id | name | city | 1 | 2 | 3 | 4 | RED | ORANGE | New York | | YELLOW | Boston | GREEN | Boston | Austin +-- Orders table: +--------- | order id | order date | com id | sales id | amount | +-- -------+ | 1 | 2 | 3 | 4 | 1/1/2014 | 2/1/2014 | 3/1/2014 | 4/1/2014 | 3 | 4 | 1 | 1 | 4 | 5 | 1 | 4 | 10000 | 5000 | 50000 | 25000 Write an SQL query to report the names of all the salespersons who did not have any orders related to the company with the name "RED". Return the result table in any order. The results should be: Output: +---- | name | +------+ | Amy | Mark | | Alex | +------+
Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here