0% found this document useful (0 votes)
189 views3 pages

Test Online Query - Bowie Adriano

The document contains details of workers in multiple sample tables including worker details, bonuses, titles and references. It includes the worker's name, position, ID, first name, last name, salary, joining date, department. The tables also include bonus details like date, amount and worker references. Another table includes worker titles and dates they became effective. The document provides sample SQL queries to retrieve specific details from the tables like workers with particular first names, highest salary, workers with same salary, managers' details, and workers with salary between a range.

Uploaded by

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

Test Online Query - Bowie Adriano

The document contains details of workers in multiple sample tables including worker details, bonuses, titles and references. It includes the worker's name, position, ID, first name, last name, salary, joining date, department. The tables also include bonus details like date, amount and worker references. Another table includes worker titles and dates they became effective. The document provides sample SQL queries to retrieve specific details from the tables like workers with particular first names, highest salary, workers with same salary, managers' details, and workers with salary between a range.

Uploaded by

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

Nama: Bowie Adriano

Position: Business Analyst


WORKER_REF_ID BONUS_DATE BONUS_AMOUNT
2/20/2016
1 5000
0:00 Sample Table – Worker
6/11/2016
2 3000
0:00
WORKER_ID FIRST_NAME LAST_NAME
2/20/2016 SALARY JOINING_DATE DEPARTMENT
3 4000
0:00
1 Monika Arora 100000 2/20/2014 9:00 HR
2/20/2016
2 1 Niharika Verma 4500
80000 6/11/2014 9:00 Admin
0:00
3 Vishal Singhal
6/11/2016 300000 2/20/2014 9:00 HR
4 2 Amitabh 3500
0:00Singh 500000 2/20/2014 9:00 Admin
5 Vivek Bhati 500000 6/11/2014 9:00 Admin
6 Vipul Diwan 200000 6/11/2014 9:00 Account
7 Satish Kumar 75000 1/20/2014 9:00 Account
8 Geetika Chauhan 90000 4/11/2014 9:00 Admin

Sample Table – Title


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

Sample Table – Bonus


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)

select
First_Name as First_Name
from Worker as Worker
where (First_Name = 'Vipul' or First_Name = 'Satish')

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

select
First_Name as First_Name
Salary as Salary
from Worker as Worker
where (Max(Salary) )

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)

select
First_Name as First_Name
Worker_Title as Worker_Title

from Worker as Worker


Inner join Title as Title on

Worker_ID = Work_Ref_ID
and (Worker_Title = ‘Manager’)

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)

select

First_Name as First_Name

Salary as Salary

from Worker as Worker

where (Salary <’500000’ and Salary >’ 100000’)

You might also like