1. Display the employee number, full employee name, job title, and hire date of all employees hired in September with the most recently hired employees displayed first. Eneve Ntea Ne 12 James, Elliott Accountant 11 Ramirez, Tyler Accountant Stoek clerk Sat e [September 30th of 2016] [September 20th of 2016] (september 2eth of 2016) 27 Long, Kai 2Rivera, Jude Administration Vice President [September 21st of 2016] 101 Dunn, Annabelle Administration Assistant [September 17th of 2016]

Database Systems: Design, Implementation, & Management
12th Edition
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Carlos Coronel, Steven Morris
Chapter1: Database Systems
Section: Chapter Questions
Problem 11P: Using your schools student information system, print your class schedule. The schedule probably...
icon
Related questions
Question

Please use sql to answer the following question an erd also provide as the picture shown

 

COMPI22 W21 ERS 100ASGM1 ORDER ITEMS
PF. ORDER ID
P TEM ID
F PRODUCT ID
QUANTITY
* UNIT PRICE
NUMBER (12)
NUMBER (12)
NUMBER (12)
NUMBER (8,2)
NUMBER (82)
COMPI22 W21 ERS 100ASGM1 ORDERS
P. ORDER ID
F CUSTOMER_ID
STATUS
COMPI22 W21 ERS 100 ASGM1 EMPLOYEES
P. EMPLOYEE ID
* FIRST NAME
LAST NAME
EMAIL
• PHONE
* HIRE DATE
MANAGER ID
JOB TITLE
NUMBER
NUMBER
VARCHAR2 (255 BYTE)
VARCHAR2 (255 BYTE)
VARCHAR2 (255 BYTE)
VARCHAR2 (50 BYTE)
DATE
NUMBER (12)
VARCHAR2 (255 BYTE)
NUMBER (6)
VARCHAR2 (20 BYTE)
NUMBER (6)
DATE
SALESMAN ID
* ORDER DATE
PK ASGM1 ORDER_ITEMS (ORDER_ID, ITEM_ID)
O FK ORDER_ITEMS_ORDERS (ORDER_ID)
FK ORDER_ITEMS PRODUCTS (PRODUCT_ID)
O PK ASGM1 ORDER_ITEMS (ORDER_ID, ITEM_ID)
ASGM1 ORDERS PK (ORDER ID)
O FK ORDERS_CUSTOMERS (CUSTOMER_ID)
FK ORDERS EMPLOYEES (SALESMAN_D)
ASGM1 EMPLOYEES PK (EMPLOYEE ID)
Og FK EMPLOYEES MANAGER (MANAGER_ID)
COMP122 W21 ERS 100.ASGM1_INVENTORIES
PF PRODUCT_ID
PF WAREHOUSE ID
* QUANTITY
NUMBER (12)
NUMBER (12)
NUMBER (8)
PK ASGM1_INVENTORIES (PRODUCT_ID, WAREHOUSE ID)
FK INVENTORIES PRODUCTS (PRODUCT_ID)
FK_INVENTORIES_WAREHOUSES (WAREHOUSE ID)
O PK ASGM1_INVENTORIES (PRODUCT_ID, WAREHOUSE ID)
COMP122_W21_ERS_100 ASGM 1_CUSTOMERS
P CUSTOMER_ID NUMBER
NAME
VARCHAR2 (255 BYTE)
VARCHAR2 (255 BYTE)
VARCHAR2 (255 BYTE)
NUMBER (8,2)
COMP122 W21_ERS_100 ASGM1_PRODUCTS
P PRODUCT_D
* PRODUCT NAME
DESCRIPTION
ADDRESS
WEBSITE
CREDIT LIMIT
NUMBER
VARCHAR2 (255 BYTE)
VARCHAR2 (2000 BYTE)
NUMBER (92)
NUMBER (92)
NUMBER
ASGM1 CUSTOMERS PK (CUSTOMER_ID)
STANDARD COoST
LIST PRICE
• CATEGORY ID
ASGM1_PRODUCTS PK (PRODUCT_ID)
FK ASGM1 PRODUCTS CATEGORIES (CATEGORY ID)
COMP122 W21 ERS 100 ASGM1 WAREHOUSES
COMP122 W21 ERS 100.ASGM1 CONTACTS
P. WAREHOUSE ID
WAREHOUSE NAME
LOCATION_ID
P CONTACT ID
* FIRST_NAME
LAST NAME
EMAIL
PHONE
CUSTOMER ID
NUMBER
VARCHAR2 (255 BYTE)
VARCHAR2 (255 BYTE)
VARCHAR2 (255 BYTE)
VARCHAR2 (20 BYTE)
NUMBER
NUMBER
VARCHAR2 (255 BYTE)
NUMBER (12)
IF
a ASGM1_WAREHOUSES PK (WAREHOUSE ID)
COMP122 W21_ERS 100 ASGM1_PRODUCT CATEGORIES
P. CATEGORY ID
• CATEGORY NAME
FK _WAREHOUSES_LOCATIONS (LOCATION_ID)
NUMBER
VARCHAR2 (255 BYTE)
> ASGM1 CONTACTS_PK (CONTACT_ID)
FK CONTACTS CUSTOMERS (CUSTOMER_ID)
ASGM1_PRODUCT CATEGORIES_PK (CATEGORY_ID)
COMP122 W21 ERS 100 ASGM1 LOCATIONS
P. LOCATION ID
ADDRESS
POSTAL CODE
NUMBER
VARCHAR2 (255 BYTE)
VARCHAR2 (20 BYTE)
VARCHAR2 (50 BYTE)
VARCHAR2 (50 BYTE)
CHAR (2 BYTE)
COMP122 W21 ERS 100.ASGM1 COUNTRIES
CHAR (2 BYTE)
VARCHAR2 (40 BYTE)
NUMBER
COMP122 W21 ERS 100 ASGM1 REGIONS
P. REGION ID
REGION NAME
COUNTRY ID
COUNTRY NAME
CITY
NUMBER
STATE
VARCHAR2 (50 BYTE)
REGION ID
COUNTRY_ID
- ASGM1_COUNTRIES_PK (COUNTRY_ID)
a ASGM1 REGIONS PK (REGION_ID)
ASGM1 LOCATIONS PKLOCATION IDA
Transcribed Image Text:COMPI22 W21 ERS 100ASGM1 ORDER ITEMS PF. ORDER ID P TEM ID F PRODUCT ID QUANTITY * UNIT PRICE NUMBER (12) NUMBER (12) NUMBER (12) NUMBER (8,2) NUMBER (82) COMPI22 W21 ERS 100ASGM1 ORDERS P. ORDER ID F CUSTOMER_ID STATUS COMPI22 W21 ERS 100 ASGM1 EMPLOYEES P. EMPLOYEE ID * FIRST NAME LAST NAME EMAIL • PHONE * HIRE DATE MANAGER ID JOB TITLE NUMBER NUMBER VARCHAR2 (255 BYTE) VARCHAR2 (255 BYTE) VARCHAR2 (255 BYTE) VARCHAR2 (50 BYTE) DATE NUMBER (12) VARCHAR2 (255 BYTE) NUMBER (6) VARCHAR2 (20 BYTE) NUMBER (6) DATE SALESMAN ID * ORDER DATE PK ASGM1 ORDER_ITEMS (ORDER_ID, ITEM_ID) O FK ORDER_ITEMS_ORDERS (ORDER_ID) FK ORDER_ITEMS PRODUCTS (PRODUCT_ID) O PK ASGM1 ORDER_ITEMS (ORDER_ID, ITEM_ID) ASGM1 ORDERS PK (ORDER ID) O FK ORDERS_CUSTOMERS (CUSTOMER_ID) FK ORDERS EMPLOYEES (SALESMAN_D) ASGM1 EMPLOYEES PK (EMPLOYEE ID) Og FK EMPLOYEES MANAGER (MANAGER_ID) COMP122 W21 ERS 100.ASGM1_INVENTORIES PF PRODUCT_ID PF WAREHOUSE ID * QUANTITY NUMBER (12) NUMBER (12) NUMBER (8) PK ASGM1_INVENTORIES (PRODUCT_ID, WAREHOUSE ID) FK INVENTORIES PRODUCTS (PRODUCT_ID) FK_INVENTORIES_WAREHOUSES (WAREHOUSE ID) O PK ASGM1_INVENTORIES (PRODUCT_ID, WAREHOUSE ID) COMP122_W21_ERS_100 ASGM 1_CUSTOMERS P CUSTOMER_ID NUMBER NAME VARCHAR2 (255 BYTE) VARCHAR2 (255 BYTE) VARCHAR2 (255 BYTE) NUMBER (8,2) COMP122 W21_ERS_100 ASGM1_PRODUCTS P PRODUCT_D * PRODUCT NAME DESCRIPTION ADDRESS WEBSITE CREDIT LIMIT NUMBER VARCHAR2 (255 BYTE) VARCHAR2 (2000 BYTE) NUMBER (92) NUMBER (92) NUMBER ASGM1 CUSTOMERS PK (CUSTOMER_ID) STANDARD COoST LIST PRICE • CATEGORY ID ASGM1_PRODUCTS PK (PRODUCT_ID) FK ASGM1 PRODUCTS CATEGORIES (CATEGORY ID) COMP122 W21 ERS 100 ASGM1 WAREHOUSES COMP122 W21 ERS 100.ASGM1 CONTACTS P. WAREHOUSE ID WAREHOUSE NAME LOCATION_ID P CONTACT ID * FIRST_NAME LAST NAME EMAIL PHONE CUSTOMER ID NUMBER VARCHAR2 (255 BYTE) VARCHAR2 (255 BYTE) VARCHAR2 (255 BYTE) VARCHAR2 (20 BYTE) NUMBER NUMBER VARCHAR2 (255 BYTE) NUMBER (12) IF a ASGM1_WAREHOUSES PK (WAREHOUSE ID) COMP122 W21_ERS 100 ASGM1_PRODUCT CATEGORIES P. CATEGORY ID • CATEGORY NAME FK _WAREHOUSES_LOCATIONS (LOCATION_ID) NUMBER VARCHAR2 (255 BYTE) > ASGM1 CONTACTS_PK (CONTACT_ID) FK CONTACTS CUSTOMERS (CUSTOMER_ID) ASGM1_PRODUCT CATEGORIES_PK (CATEGORY_ID) COMP122 W21 ERS 100 ASGM1 LOCATIONS P. LOCATION ID ADDRESS POSTAL CODE NUMBER VARCHAR2 (255 BYTE) VARCHAR2 (20 BYTE) VARCHAR2 (50 BYTE) VARCHAR2 (50 BYTE) CHAR (2 BYTE) COMP122 W21 ERS 100.ASGM1 COUNTRIES CHAR (2 BYTE) VARCHAR2 (40 BYTE) NUMBER COMP122 W21 ERS 100 ASGM1 REGIONS P. REGION ID REGION NAME COUNTRY ID COUNTRY NAME CITY NUMBER STATE VARCHAR2 (50 BYTE) REGION ID COUNTRY_ID - ASGM1_COUNTRIES_PK (COUNTRY_ID) a ASGM1 REGIONS PK (REGION_ID) ASGM1 LOCATIONS PKLOCATION IDA
1. Display the employee number, full employee name, job title, and hire date of all
employees hired in September with the most recently hired employees displayed
first.
Enlevee NteName
12 James, Elliott Accountant
11 Ramirez, Tyler Accountant
27 Long, Kai
2Rivera, Jude
101 Dunn, Annabelle Administration Assistant
[September 30oth of 2016]
[September 28th of 2016]
[september 2eth of 2016)
Stock clerk
Administration Vice President (September 2lst of 2016]
(September 17th of 2016]
Milestone 2 - Week 3 (Question 2, 3, 4, 5, and 6)
2. The company wants to see the total sale amount per sales person (salesman) for all
orders. Assume that online orders do not have any sales representative. For online
orders (orders with no salesman ID), consider the salesman ID as 0. Display the
salesman ID and the total sale amount for each employee.
Sort the result according to employee number.
Enlyee te tat S
O $18,245, 463.50
$1,884,295.40
$3, 525, 462.19
$2, 754,951.05
$3, 522, 704.53
$3, 900, 172.99
ו3. 737 ,233 ,$3
54
55
56
57
59
60
3. Display customer Id, customer name and total number of orders for customers that
the value of their customer ID is in values from 35 to 45. Include the customers with
no orders in your report if their customer ID falls in the range 35 and 45.
Sort the result by the value of total orders.
Cuntone Nane
38 Kraft Meinz
37 Hunt sman
35 Kimberly-Ciark
40Fluor
39 Lear
36 Hartford Finaneial services Group
41 ABCOM
43 Facebook
42 Becton Dickinson
45 Centurylink
44 Jabil Cireuit
Transcribed Image Text:1. Display the employee number, full employee name, job title, and hire date of all employees hired in September with the most recently hired employees displayed first. Enlevee NteName 12 James, Elliott Accountant 11 Ramirez, Tyler Accountant 27 Long, Kai 2Rivera, Jude 101 Dunn, Annabelle Administration Assistant [September 30oth of 2016] [September 28th of 2016] [september 2eth of 2016) Stock clerk Administration Vice President (September 2lst of 2016] (September 17th of 2016] Milestone 2 - Week 3 (Question 2, 3, 4, 5, and 6) 2. The company wants to see the total sale amount per sales person (salesman) for all orders. Assume that online orders do not have any sales representative. For online orders (orders with no salesman ID), consider the salesman ID as 0. Display the salesman ID and the total sale amount for each employee. Sort the result according to employee number. Enlyee te tat S O $18,245, 463.50 $1,884,295.40 $3, 525, 462.19 $2, 754,951.05 $3, 522, 704.53 $3, 900, 172.99 ו3. 737 ,233 ,$3 54 55 56 57 59 60 3. Display customer Id, customer name and total number of orders for customers that the value of their customer ID is in values from 35 to 45. Include the customers with no orders in your report if their customer ID falls in the range 35 and 45. Sort the result by the value of total orders. Cuntone Nane 38 Kraft Meinz 37 Hunt sman 35 Kimberly-Ciark 40Fluor 39 Lear 36 Hartford Finaneial services Group 41 ABCOM 43 Facebook 42 Becton Dickinson 45 Centurylink 44 Jabil Cireuit
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Multiple table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
MIS
MIS
Computer Science
ISBN:
9781337681919
Author:
BIDGOLI
Publisher:
Cengage
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr