Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Employees table EMPLOYEE_ID FIRST_NAME LAST_NAME EMAIL PHONE_NUMBER HIRE_DATE JOB_ID SALARY COMMISSION_PCT MANAGER_ID DEPARTMENT_ID 100 Steven King SKING 515.123.4567 17-JUN-03 AD_PRES 24000 - - 90 101

Employees table

EMPLOYEE_ID FIRST_NAME LAST_NAME EMAIL PHONE_NUMBER HIRE_DATE JOB_ID SALARY COMMISSION_PCT MANAGER_ID DEPARTMENT_ID
100 Steven King SKING 515.123.4567 17-JUN-03 AD_PRES 24000 - - 90
101 Neena Kochhar NKOCHHAR 515.123.4568 21-SEP-05 AD_VP 17000 - 100 90
102 Lex De Haan LDEHAAN 515.123.4569 13-JAN-01 AD_VP 17000 - 100 90

Locations

LOCATION_ID STREET_ADDRESS POSTAL_CODE CITY STATE_PROVINCE COUNTRY_ID
1000 1297 Via Cola di Rie 00989 Roma - IT
1100 93091 Calle della Testa 10934 Venice - IT
1200 2017 Shinjuku-ku 1689 Tokyo Tokyo Prefecture JP

Departments table

DEPARTMENT_ID DEPARTMENT_NAME MANAGER_ID LOCATION_ID
10 Administration 200 1700
20 Marketing 201 1800
30 Purchasing 114 1700

Countries

COUNTRY_ID COUNTRY_NAME REGION_ID
AR Argentina 2
AU Australia 3
BE Belgium 1

Please write a sql statement that will show all employees who work in departments located in the Germany. Write a sql statement to show the employees who worked in the Shipping department and earn more than the average salary. Write a sql statement to display the country name, city,postal code,street address and number of those departments where at least 2 employees are working.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Conceptual Database Design An Entity Relationship Approach

Authors: Carol Batini, Stefano Ceri, Shamkant B. Navathe

1st Edition

0805302441, 978-0805302448

More Books

Students also viewed these Databases questions