You are on page 1of 6

PEMODELAN DAN IMPLEMENTASI BASIS DATA IT-45-02 [UIR]

Dashboard / My courses / CTJ2F3-IT-45-02 / Minggu 13: Sub-Queries / Kuis 13

Started on Saturday, 20 May 2023, 7:13 PM

State Finished

Completed on Saturday, 20 May 2023, 7:16 PM

Time taken 3 mins 25 secs

Marks 14.00/15.00

Grade 93.33 out of 100.00

Question 1

Incorrect

Mark 0.00 out of 1.00

A subquery can be used anywhere an expression is allowed.

Select one:

a. True

b. False 

The correct answer is: True

Question 2

Correct

Mark 1.00 out of 1.00

An ORDER BY can be used in a subquery.

Select one:

a. False 

b. True

The correct answer is: False


Question 3

Correct

Mark 1.00 out of 1.00

Below is an example of ...


SELECT EMP.EmployeeID FROM HumanResources.Employee EMP WHERE EMP.ContactID IN (SELECT P.ContactID FROM
Person.Contact P WHERE P.Title = 'Mrs.')

Select one:

a. Noncorrelated Subquery 

b. Correlated Subquery

The correct answer is: Noncorrelated Subquery

Question 4

Correct

Mark 1.00 out of 1.00

Find all the tuples having a temperature greater than ‘Paris’.

Select one:

a. SELECT * FROM weather WHERE temperature > (SELECT city FROM weather WHERE city = ‘Paris’)

b. SELECT * FROM weather WHERE temperature > (SELECT * FROM weather WHERE city = ‘Paris’)

c. SELECT * FROM weather WHERE temperature > ‘Paris’ temperature

d. SELECT * FROM weather WHERE temperature > (SELECT temperature FROM weather WHERE city = ‘Paris’ 

The correct answer is: SELECT * FROM weather WHERE temperature > (SELECT temperature FROM weather WHERE
city = ‘Paris’

Question 5

Correct

Mark 1.00 out of 1.00

If a table appears only in a subquery and not in the outer query, then columns from that table can be included in the
output.

Select one:

a. True

b. False 

The correct answer is: False


Question 6

Correct

Mark 1.00 out of 1.00

In case of correlated subquery the outer query is executed once. The subquery is executed ............. for every row in the
outer query.

Select one:

a. Once 

b. Twice

c. Thrice

d. Both A & B

The correct answer is: Once

Question 7

Correct

Mark 1.00 out of 1.00

In which of the following clauses can a sub-query be used?

Select one:

a. FROM

b. HAVING

c. All of the above 

d. WHERE

The correct answer is: All of the above

Question 8

Correct

Mark 1.00 out of 1.00

The subquery is known as a ................. subquery because the subquery is related to the outer SQL statement.

Select one:

a. Corelational

b. Correlated 

c. Relational

d. Related

The correct answer is: Correlated


Question 9

Correct

Mark 1.00 out of 1.00

The UNION SQL clause can be used with

Select one:

a. UPDATE clause only

b. DELETE and UPDATE clauses

c. SELECT clause only 

d. All of the mentioned

The correct answer is: SELECT clause only

Question 10

Correct

Mark 1.00 out of 1.00

What is a correlated sub-query?

Select one:

a. A sub-query that substitutes the names of the outer query

b. An independent query that uses the correlation name of another independent query.

c. A sub-query that uses the correlation name of an outer query 

d. A sub-query that does not depend on its outer query

The correct answer is: A sub-query that uses the correlation name of an outer query

Question 11

Correct

Mark 1.00 out of 1.00

Where subqueries can not be used?

Select one:

a. The FROM clause in the SELECT statement

b. The WHERE clause only in the SELECT statement 

c. Field names in the SELECT statement

d. The WHERE clause in SELECT as well as all DML statements

The correct answer is: The WHERE clause only in the SELECT statement
Question 12

Correct

Mark 1.00 out of 1.00

Which of the following is true about sub-queries?

Select one:

a. The user can execute the main query and then, if wanted, execute the sub-query

b. They execute after the main query executes

c. They execute before the main query executes. 

d. They execute in parallel to the main query

The correct answer is: They execute before the main query executes.

Question 13

Correct

Mark 1.00 out of 1.00

Which of the following operations requires the relations to be union compatible?

Select one:

a. UNION

b. ALL OF THESE 

c. INTERSECTION

The correct answer is: ALL OF THESE

Question 14

Correct

Mark 1.00 out of 1.00

Which of the following statement is TRUE regarding subqueries?

Select one:

a. Outer query and inner query can get data from different tables 

b. Inner queries in WHERE clause can contain ORDER BY

c. Outer query and inner query must get data from the same table

d. Inner queries cannot contain GROUP BY clause

The correct answer is: Outer query and inner query can get data from different tables
Question 15

Correct

Mark 1.00 out of 1.00

Which of the following statements are TRUE regarding subqueries?

Select one:

a. A subquery can retrieve zero or more rows

b. A subquery can appear on either side of a comparison operator

c. There is no limit on the number of subquery levels in the WHERE clause of a SELECT statement

d. Both A and B 

The correct answer is: Both A and B

Previous Activity

Jump to...

Next Activity

You might also like