Oracle APEX Tutorial 29 SQL's SELECT with JOINing of 3, 4 or 5 Tables

Sharing buttons:

Salam alaikum this is Adam honest man a

student of King Faisal University in

this video we will join three four and

five tables we will be using the tables

that were generated in lesson 16 so make

sure you did that before proceeding here

click sequel workshop then sequel

commands set rolls value the maximum

let's answer the following questions in

number one we will disobey employee ID

first name job ID and job title from

employees and jobs tables

we will also disobey the employees job

history information such as a start date

end date job ID and took title from job


arranging by employee ID in our design

notice that both employees and job

history tables are related to jobs table

this is because both of them have job

IDs and they are different the job ID in

the employees table is his current ID

while the job ID in the job history are

his best job positions so for this

problem we will use the three tables and

their free relations which means we will

declare jobs table twice we will use

equi-join for this select but before we

write the comments let's continue with

from cloths from employees e job mr. H

jokes j1 jumps Jade would notice we

declare jobs flies now the relations

well II but employee ID equals H books

employee ID and E the job ID equals j1

the job ID and H dot job ID equals date

to the job ID order by e dot employee ID

now let's display our columns employees

employee ID first name job ID and job

title from j1

jobs table start date end date job


ID and job title from j2 jobs run it

let's explain one employee nina from

1989 to 1993 she was a public accountant

from 1993 to 1997 she was an accounting

major currently she is the

administration vice president in number

two we will have slay the employee ID

first name Department ID Department name

location ID city country ID country name

reason ID and region name which means we

will use five tables and four relations

select again it's continually from

employees in departments team locations

l countries c and regions are where

either department ID equals d dot

department ID and d dot location ID

equals l dot location ID and l dot

country ID equals c dot country ID and

see that region ID equals albert region

ID for our columns employee ID first

name d dot Department ID department name

L dot location ID city city or country

ID country name arbitraging ID and

region name one it employee 149 is from

cells development located in export city

in United Kingdom which is in Europe and

our next lesson we will discuss sub

queries thank you for your interest in

this channel