2.Based on question1, write a query to find the first three (3) youngest employee serving each Region. If a Region is not served by an employee, ignore it. The output is: After the rank it looks like E:\CSC315\Data>sqlite3 northwind.db ".read q2.sql" 5 Steven | Buchanan | 1987-03-04|1|Eastern 1 2 Andrew Fuller | 1984-02-19|1|Eastern 2 1 | Nancy | Davolio | 1980-12-08|1|Eastern 3 4 Margaret | Peacock | 1969-09-19|1|Eastern 4 6 Michael Suyama | 1995-07-02|2|Western 1 7 Robert King|1992-05-29|2| Western | 2 9 Anne Dodsworth | 1998-01-27|3|Northern | 1 8 Laura Callahan | 1990-01-09|3|Northern 2 3 Janet | Leverling 1995-08-30|4|Southern | 1

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

I NEED ACCURATE ANSWER FOR QUESTION# 2 PLEASE.             

 

Homework6
1. Write an SQL query to list EmployeelD, firs name, last name, birthdate, Territoryld,
TerritoryDescription, RegionID, RegionDescription for each employee on northwind.db.
schema Employee
ld
LastName
FirstName
Title
TitleOfCourtesy
BirthDate
HireDate
Address
INTEGER
VARCHAR
VARCHAR
VARCHAR
VARCHAR
VARCHAR
VARCHAR
VARCHAR
VARCHAR
VARCHAR
VARCHAR
VARCHAR
VARCHAR
VARCHAR
BLOB NULL
VARCHAR
INTEGER
VARCHAR
City
Region
PostalCode
Country
HomePhone
Extension
Photo
Notes
Reports To
PhotoPath
"Id" INTEGER PRIMARY KEY
The output is:
schema Region
Id
schema Employee Territory
ld
VARCHAR
INTEGER
VARCHAR
"Id" VARCHAR PRIMARY KEY,
Employeeld
Territoryld
"Employeeld" INTEGER Foreign KEY,
Territoryld VARCHAR Foreign KEY,
schema Territory
Id
VARCHAR
TerritoryDescription VARCHAR
INTEGER
Regionld
1d"VARCHAR PRIMARY KEY,
Regionld "INTEGER Foreign KEY,
INTEGER
RegionDescription VARCHAR
"Id" INTEGER PRIMARY KEY,
Transcribed Image Text:Homework6 1. Write an SQL query to list EmployeelD, firs name, last name, birthdate, Territoryld, TerritoryDescription, RegionID, RegionDescription for each employee on northwind.db. schema Employee ld LastName FirstName Title TitleOfCourtesy BirthDate HireDate Address INTEGER VARCHAR VARCHAR VARCHAR VARCHAR VARCHAR VARCHAR VARCHAR VARCHAR VARCHAR VARCHAR VARCHAR VARCHAR VARCHAR BLOB NULL VARCHAR INTEGER VARCHAR City Region PostalCode Country HomePhone Extension Photo Notes Reports To PhotoPath "Id" INTEGER PRIMARY KEY The output is: schema Region Id schema Employee Territory ld VARCHAR INTEGER VARCHAR "Id" VARCHAR PRIMARY KEY, Employeeld Territoryld "Employeeld" INTEGER Foreign KEY, Territoryld VARCHAR Foreign KEY, schema Territory Id VARCHAR TerritoryDescription VARCHAR INTEGER Regionld 1d"VARCHAR PRIMARY KEY, Regionld "INTEGER Foreign KEY, INTEGER RegionDescription VARCHAR "Id" INTEGER PRIMARY KEY,
2.Based on question1, write a query to find the first three (3) youngest employee serving each Region. If
a Region is not served by an employee, ignore it.
The output is:
After the rank it looks like
E:\CSC315\Data>sqlite3 northwind.db ".read q2.sql"
5 Steven Buchanan | 1987-03-04|1|Eastern | 1
2 Andrew Fuller | 1984-02-19|1|Eastern 2
1 Nancy | Davolio | 1980-12-08 |1 | Eastern 3
4 Margaret | Peacock | 1969-09-19|1|Eastern 4
6 Michael Suyama | 1995-07-02|2|Western | 1
7 | Robert King | 1992-05-29|2|Western 2
9 Anne | Dodsworth | 1998-01-27|3|Northern 1
8 Laura Callahan | 1990-01-09|3|Northern 2
3 Janet Leverling|1995-08-30|4|Southern | 1
The final output is:
E:\CSC315\Data>sqlite3 northwind.db ".read q2.sql"
5 Steven Buchanan | 1987-03-04|1| Eastern
2 Andrew Fuller | 1984-02-19|1|Eastern
1 Nancy | Davolio | 1980-12-08 |1 | Eastern
6 Michael Suyama | 1995-07-02|2| Western
7 Robert King|1992-05-29|2| Western
9 Anne Dodsworth | 1998-01-27|3|Northern
8 Laura Callahan | 1990-01-09|3|Northern
3 Janet Leverling|1995-08-30|4|Southern
Transcribed Image Text:2.Based on question1, write a query to find the first three (3) youngest employee serving each Region. If a Region is not served by an employee, ignore it. The output is: After the rank it looks like E:\CSC315\Data>sqlite3 northwind.db ".read q2.sql" 5 Steven Buchanan | 1987-03-04|1|Eastern | 1 2 Andrew Fuller | 1984-02-19|1|Eastern 2 1 Nancy | Davolio | 1980-12-08 |1 | Eastern 3 4 Margaret | Peacock | 1969-09-19|1|Eastern 4 6 Michael Suyama | 1995-07-02|2|Western | 1 7 | Robert King | 1992-05-29|2|Western 2 9 Anne | Dodsworth | 1998-01-27|3|Northern 1 8 Laura Callahan | 1990-01-09|3|Northern 2 3 Janet Leverling|1995-08-30|4|Southern | 1 The final output is: E:\CSC315\Data>sqlite3 northwind.db ".read q2.sql" 5 Steven Buchanan | 1987-03-04|1| Eastern 2 Andrew Fuller | 1984-02-19|1|Eastern 1 Nancy | Davolio | 1980-12-08 |1 | Eastern 6 Michael Suyama | 1995-07-02|2| Western 7 Robert King|1992-05-29|2| Western 9 Anne Dodsworth | 1998-01-27|3|Northern 8 Laura Callahan | 1990-01-09|3|Northern 3 Janet Leverling|1995-08-30|4|Southern
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