0% found this document useful (0 votes)
79 views1 page

SQL Queries for Employee Data Retrieval

This document contains two SQL queries. The first query selects person numbers, full names, job names, and email addresses from various tables where the full name is either 'Sharma, Amit' or 'Sharma, Vijay' or the job name is 'CON' or 'Contractor'. The second query selects a single class code from tables where the class category is 'Approval Type'.

Uploaded by

devendrapennam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views1 page

SQL Queries for Employee Data Retrieval

This document contains two SQL queries. The first query selects person numbers, full names, job names, and email addresses from various tables where the full name is either 'Sharma, Amit' or 'Sharma, Vijay' or the job name is 'CON' or 'Contractor'. The second query selects a single class code from tables where the class category is 'Approval Type'.

Uploaded by

devendrapennam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

select pap.

person_number
,ppn.full_name
,pj.name
,pea.email_address
from per_all_people_f pap
,per_person_names_f ppn
,per_all_assignments_m paa
,per_jobs pj
,per_email_addresses pea
where pap.person_id = ppn.person_id
and ppn.person_id = paa.person_id
and pj.job_id = paa.job_id
and pap.PRIMARY_EMAIL_ID = pea.email_address_id
and (ppn.full_name IN ('Sharma, Amit','Sharma, Vijay')
OR (pj.name = 'CON' OR pj.name ='Contractor')
)

select pcc_tl.class_code
from PJF_CLASS_CATEGORIES_B ppc_b
,PJF_CLASS_CATEGORIES_TL ppc_tl
,PJF_CLASS_CODES_B pcc_b
,PJF_CLASS_CODES_TL pcc_tl
where pcc_b.CLASS_CATEGORY_ID = ppc_b.CLASS_CATEGORY_ID
and ppc_b.CLASS_CATEGORY_ID = ppc_tl.CLASS_CATEGORY_ID
and ppc_tl.CLASS_CATEGORY = 'Approval Type'
and pcc_b.class_code_id = pcc_tl.class_code_id
and rownum=1

You might also like