database with Howing BUIMOTTO Table: Employees | Column Name 1 Туре I id | int | varchar I I name +---- ------+ id is the primary key for this table. Each row of this table contains the id and the name of an employee in a company. Table: EmployeeUNI | Column Name | Type | id | unique_id I int | int +--- +-- (id, unique id) is the primary key for this table. Each row of this table contains the id and the corresponding unique id of an employee in the company. Add the following data to your tables: Input: Employees table: +----+- | id | name +---- | 1 | Alice | Bob | 11 | Meir | 90 | Winston | 3 | Jonathan | +----+- ---+ EmployeeUNI table: +---- | id | unique_id | +----+ | 3 | 1 | 11 | 2 | 90 | 3 +---- Write an SQL query to show the unique ID of each user, If a user does not have a unique ID replace just show null. Return the result table in any order. The results should be:

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

Write the full sql query including (create,insert,select...) please

Create the following table in your database with the following schema:
Table: Employees
| Column Name
| Type
| id
| int
| varcharI
| name
+---
+---------+
id is the primary key for this table.
Each row of this table contains the id and the name of an employee in a
company.
Table: EmployeeUNI
| Column Name
1 Туре
+-
| id
I unique_id
| int
| int
+---
+-
----+
(id, unique_id) is the primary key for this table.
Each row of this table contains the id and the corresponding unique id of an
employee in the company.
Add the following data to your tables:
Input:
Employees table:
+----+-----
| id | name
+----+
| Alice
| Bob
| 11 | Meir
| 90 | Winston
| Jonathan |
| 1
| 3
+----+---
-----+
EmployeeUNI table:
+----+-
------+
| id | unique id |
+----+
| 3
| 1
| 11 | 2
| 90 | 3
+--
Write an SQL query to show the unique ID of each user, If a user does not have a unique ID replace
just show null.
Return the result table in any order.
The results should be:
Transcribed Image Text:Create the following table in your database with the following schema: Table: Employees | Column Name | Type | id | int | varcharI | name +--- +---------+ id is the primary key for this table. Each row of this table contains the id and the name of an employee in a company. Table: EmployeeUNI | Column Name 1 Туре +- | id I unique_id | int | int +--- +- ----+ (id, unique_id) is the primary key for this table. Each row of this table contains the id and the corresponding unique id of an employee in the company. Add the following data to your tables: Input: Employees table: +----+----- | id | name +----+ | Alice | Bob | 11 | Meir | 90 | Winston | Jonathan | | 1 | 3 +----+--- -----+ EmployeeUNI table: +----+- ------+ | id | unique id | +----+ | 3 | 1 | 11 | 2 | 90 | 3 +-- Write an SQL query to show the unique ID of each user, If a user does not have a unique ID replace just show null. Return the result table in any order. The results should be:
Output:
+---
| unique_id | name
I null
I null
| Alice
| Bob
| Meir
| Winston
| Jonathan
| 3
| 1
+-
Explanation:
Alice and Bob do not have a unique ID, We will show null instead.
The unique ID of Meir is 2.
The unique ID of Winston is 3.
The unique ID of Jonathan is 1.
Transcribed Image Text:Output: +--- | unique_id | name I null I null | Alice | Bob | Meir | Winston | Jonathan | 3 | 1 +- Explanation: Alice and Bob do not have a unique ID, We will show null instead. The unique ID of Meir is 2. The unique ID of Winston is 3. The unique ID of Jonathan is 1.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
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