Search Header Logo

SQL Quiz

Authored by Emily Anne

Computers

University

Used 1+ times

SQL Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

33 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which SQL clause is used to filter records after a GROUP BY operation?

WHERE

HAVING

FILTER

ORDER BY

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of a JOIN in SQL?

To combine data from multiple tables into one result set

To delete rows from a table

To update data in a table

To create a new table from existing data

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a subquery in SQL?

A) A query that retrieves data from a single table

B) A query that returns a single value for use in another query

C) A query that joins two or more tables together

D) A query that performs complex joins

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of using DISTINCT in a SELECT statement?

Removes duplicate rows in the result set

Groups data based on a column

Sorts the result set in ascending order

Limits the number of rows returned

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the RANK() window function do?

It assigns a unique rank to each row in a result set, without ties.

It assigns a rank based on the order of the rows, with ties given the same rank.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is true about UNION in SQL?

UNION returns only the distinct records from both queries

UNION returns all records from both queries, including duplicates

UNION requires the same number of columns and data types in both queries

UNION does not allow sorting of the result set

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the effect of the GROUP BY clause?

It filters rows based on conditions

It combines rows that have the same values into summary rows

It sorts the result set in ascending order

It limits the number of rows returned

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?

Discover more resources for Computers