Search Header Logo

SQL Subqueries and Functions Quiz

Authored by Harrison Kitema

Other

Professional Development

Used 2+ times

SQL Subqueries and Functions Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following best describes a correlated subquery?

It runs only once and returns a single value.

It is independent of the outer query.

It references columns from the outer query.

It cannot be used in WHERE clauses.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which SQL clause can a subquery not be used in?

SELECT

GROUP BY

WHERE

FROM

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main advantage of using a CTE over a subquery?

CTEs are faster.

CTEs allow recursive operations and improve readability.

CTEs are always written inside the FROM clause.

CTEs return multiple result sets.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In SQL, what does the OVER() clause do in a window function?

It joins multiple tables.

It groups rows into a temporary table.

It defines the window of rows for the function to operate on.

It filters results before aggregation.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following functions is typically used with window functions?

SUM()

COUNT()

ROW_NUMBER()

MAX()

6.

OPEN ENDED QUESTION

3 mins • 1 pt

A subquery can return multiple rows and columns.

Evaluate responses using AI:

OFF

7.

OPEN ENDED QUESTION

3 mins • 1 pt

Window functions always require a GROUP BY clause.

Evaluate responses using AI:

OFF

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?