Sei sulla pagina 1di 18

TUGAS 2 BASIS DATA

Kelas : TI-41-03

Kelompok :

 Arifianto Aji Putro (1201174200)


 Annisa Nur Falahi Ahmad (1201174242)
 Nur Rezqi Hadhiningsari (1201174123)
 Salsabilah Putri Suharto (1201174143)
 Svadev Pranamam Mahasagara (1201174160)

No Import SQL
1 Question Retrieve the names of all employees who do not have supervisors
Query

Result
2 Question
Nested queries(Comparison operator IN)
(Q4A)
Qu

3 Question Nested Queries (Use tuples of values in comparisons)


Query
Result

4 Question
Query

Result
5 Question Retrieve the name of each employee who has a dependent with the same first
(Q16) name and is the same sex as the employee
Query

Result

6 Question
(Q16A)
Query
Result

7 Question
(Q7)
Query

Result
8 Question List first and last name of employees who work on ALL projects controlled by
Dno=5
Query

Result

9 Question
(Q3B)
Query
Result

10 Question
(Q17)
Query

Result
11 Question Rename any attribute that appears in the result of a query
(Q8A)
Query

Result

12 Question
(Q1A)
Query
Result

13 Question Rename attributes of one relation so it can be joined with another using
(Q1B) NATURAL JOIN
Query

Answer
14 Question
(Q2A)

Query

Result

15 Question
(Q19)
Query
Result

16 Question
(Q19A)
Query

Result
17 Question Find the sum of the salaries of all employees of the ‘research’ departement, as
(Q20) well as the maximum salary, the minimum salary, and the average salary in this
department
Query

Result

18 Question
(Q21)
Query
Result

19 Question
(Q22)
Query

Result

20 Question
(Q24)
Query

Result

21 Question
(Q25)
Query
Result

22 Question For each project on which more than two employees work, retrieve the project
(Q26) number, the project name, and the number of employees who work on the
project.
Query

Result
23 Question
(Q28)
Query

Result

24 Question
(Q28)
Query

Result
25 Question
(Q28)
Query

Result

26 Question
(Q28)
Query

Result

Potrebbero piacerti anche