Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please describe what each code is doing below: 1. a) Select e.last_name as Employee, d.department_name as Department From employees e Join departments d On (e.department_id

Please describe what each code is doing below:

1. a) Select e.last_name as "Employee", d.department_name as "Department"

From employees e Join departments d

On (e.department_id = d.department_id)

Where e.last_name like 'H%' or e.last_name like 'K%'

b) Select e.last_name, d.department_id, d.department_name

From employees e

Left Outer Join departments d

On (e.department_id = d.department_id);

c) Select e.last_name, d.department_id, d.department_name

From employees e

Right Outer Join departments d

On (e.department_id = d.department_id);

d) Select e.last_name, d.department_id, d.department_name

From employees e

Full Outer Join departments d

On (e.department_id = d.department_id);

e) Select Max (salary)

From employees;

f) Select Max (hire_date)

From employees;

g) Select Min (hire_date)

From employees;

h) Select Sum (salary)

From employees

Where department_id =90;

i) Select Round(AVG(salary),2)

From employees

Where department_id =90;

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

Step: 3

blur-text-image

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

More Books

Students also viewed these Databases questions