Create the following tables in your database with the following schema: Table: Employee | Column Name | Type +--- | int I varchar | | empId | name | supervisor | int | salary | int +- empId is the primary key column for this table. Each row of this table indicates the name and the ID of an employee in addition to their salary and the id of their manager. Table: Bonus | Column Name | Type I ------+ | empId | bonus | int I | int I +- +------+ empId is the primary key column for this table. empId is a foreign key to empId from the Employee table. Each row of this table contains the id of an employee and their respective bonus. Add the following data to your tables: Input: Employee table: +--- | empId | name | supervisor | salary | | 4000 | 1000 | 2000 | null | 3 | 1 | 2 | 4 | Brad | John | 3 | Dan | 3 | Thomas | 3 | 4000 |

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Create the following tables in your database with the following schema:
Table: Employee
| Column Name | Type
| empId
I name
| supervisor
| salary
| int
| varchar |
| int
| int
empId is the primary key column for this table.
Each row of this table indicates the name and the ID of an employee in
addition to their salary and the id of their manager.
Table: Bonus
| Column Name | Type |
| empId
| bonus
| int
| int
empId is the primary key column for this table.
empId is a foreign key to empId from the Employee table.
Each row of this table contains the id of an employee and their respective
bonus.
Add the following data to your tables:
Input:
Employee table:
| empId | name
| supervisor | salary |
| 3
| Brad
| null
| 4000
| 1000
| 2000
| 4000
| John
| 3
| 2
| 4
| Dan
| 3
| Thomas | 3
Transcribed Image Text:Create the following tables in your database with the following schema: Table: Employee | Column Name | Type | empId I name | supervisor | salary | int | varchar | | int | int empId is the primary key column for this table. Each row of this table indicates the name and the ID of an employee in addition to their salary and the id of their manager. Table: Bonus | Column Name | Type | | empId | bonus | int | int empId is the primary key column for this table. empId is a foreign key to empId from the Employee table. Each row of this table contains the id of an employee and their respective bonus. Add the following data to your tables: Input: Employee table: | empId | name | supervisor | salary | | 3 | Brad | null | 4000 | 1000 | 2000 | 4000 | John | 3 | 2 | 4 | Dan | 3 | Thomas | 3
Bonus table:
| empId | bonus |
| 2
| 4
| 500
| 2000
Write an SQL query to report the name and bonus amount of each employee with a bonus less than
1000.
Return the result table in any order.
The result should be:
Output:
| name | bonus I
| Brad | null
| John | null
| Dan
| 500
Transcribed Image Text:Bonus table: | empId | bonus | | 2 | 4 | 500 | 2000 Write an SQL query to report the name and bonus amount of each employee with a bonus less than 1000. Return the result table in any order. The result should be: Output: | name | bonus I | Brad | null | John | null | Dan | 500
Expert Solution
Step 1

The result table is shown below :

steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY