Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Sample Table – Worker

WORKER_ID FIRST_NAME LAST_NAME SALARY JOINING_DATE

1 Monika Arora 100000 2014-02-20 09:00


2 Niharika Verma 80000 2014-06-11 09:00
3 Vishal Singhal 300000 2014-02-20 09:00
4 Amitabh Singh 500000 2014-02-20 09:00
5 Vivek Bhati 500000 2014-06-11 09:00
6 Vipul Diwan 200000 2014-06-11 09:00
7 Satish Kumar 75000 2014-01-20 09:00
8 Geetika Chauhan 90000 2014-04-11 09:00

Sample Table – Title


WORKER_REF_I
WORKER_TITLE AFFECTED_FROM
D
1 Manager 2016-02-20 00:00
2 Executive 2016-06-11 00:00
8 Executive 2016-06-11 00:00
5 Manager 2016-06-11 00:00
4 Asst. Manager 2016-06-11 00:00
7 Executive 2016-06-11 00:00
6 Lead 2016-06-11 00:00
3 Lead 2016-06-11 00:00

Sample Table – Bonus


WORKER_BONUS_ID WORKER_REF_ID BONUS_DATE BONUS_AMOUNT
1 1 2016-02-20 00:00 5000
2 3 2016-06-11 00:00 3000
3 4 2016-02-20 00:00 4000
4 2 2016-02-20 00:00 4500
5 6 2016-06-11 00:00 3500

Sample Table Location


WORKER_LOCATION_ID LOCATION ADDRESS
L1 HO JL. ASIA TENGAH NO.19
L2 HO 2 JL. ASIA TIMUR NO.22
L3 CABANG 1 JL. AFRIKA NO.17
L4 CABANG 2 JL. AFRIKA NO. 99

Sample Table Department

DEPARTMENT_ID NAME
D1 HRD
D2 GA
D3 ADMIN
D4 FINANCE
D5 ACCOUNTING

Sample Table Mapping

WORKER_MAPPING_ID DEPART_ID LOCATION_ID WORKER_ID


M1 D1 L1 1
M2 D2 L1 2
M3 D3 L3 3
M4 D4 L4 4
M5 D5 L4 5
M6 D2 L1 6
M7 D1 L1 7
M8 D5 L4 8
1. Write An SQL Query To Print Details For Workers With The First Name As “Vipul” And “Satish”
From Worker Table.
(Menampilkan Rincian Untuk Pekerja Dengan Nama Depan Sebagai “Vipul” Dan “Satish” Dari Tabel
Pekerja)

2. Write An SQL Query To Determine The Highest Salary From A Table (Untuk menentukan gaji
tertinggi dari sebuah table)

3. Write An SQL Query To Fetch The List Of Employees With The Same Salary
(mengambil daftar karyawan dengan gaji yang sama)

4. Write An SQL Query To Print Details Of The Workers Who Are Also Managers (Rincian Para
Pekerja Yang Juga Manajer)
5. Write An SQL Query To Print Details Of The Workers Whose SALARY Lies Between 100000 And
500000 (Rincian Para Pekerja Yang GAJINYA Terletak Di Antara 100000 Dan 500000)

6. Show the names of employees and positions that do not get bonuses.

7. Show the names of employees working at the HO with their addresses and the total salary
earned by those who start working in June.

8. Show total workers at each location

9. Added an employee with the name Sarju Widarto Sahid by joining on July 1 2016 who worked as
Lead Admin who worked at HO 2 with a salary of 100000

10. Show the total employees along with the total salary in each Department

You might also like