Search Header Logo

SQL Mastery

Authored by Hristo Iliev

Computers

12th Grade

Used 1+ times

SQL Mastery
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the purpose of the SQL SELECT statement?

To delete data from a database

To create a new database

To retrieve data from a database

To update data in a database

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Explain the difference between the WHERE and HAVING clauses in SQL.

The WHERE clause is used to filter rows before any groupings are made, while the HAVING clause is used to filter rows after the grouping has been done.

The WHERE clause is used for updating data, while the HAVING clause is used for inserting new data.

The WHERE clause is used for joining tables, while the HAVING clause is used for sorting the result set.

The WHERE clause is used for mathematical operations, while the HAVING clause is used for string manipulations.

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What are the different types of SQL joins? Provide an example for each.

UPPER JOIN, LOWER JOIN, MIDDLE JOIN

OUTER JOIN, CENTER JOIN, SIDE JOIN

INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN

FIRST JOIN, SECOND JOIN, THIRD JOIN

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

How does the UNION operator work in SQL? Provide an example.

The UNION operator in SQL is used to divide the result sets of two or more SELECT statements.

The UNION operator in SQL is used to multiply the result sets of two or more SELECT statements.

The UNION operator in SQL is used to subtract the result sets of two or more SELECT statements.

The UNION operator in SQL is used to combine the result sets of two or more SELECT statements.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are the commonly used aggregation functions in SQL? Provide a brief explanation for each.

HIGH, LOW, RANGE, MEDIAN

ADD, SUBTRACT, MULTIPLY, DIVIDE

COUNT, SUM, AVG, MIN, and MAX

FIRST, LAST, AVERAGE, TOTAL

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Explain the concept of primary key in SQL Data Definition Language.

A primary key in SQL Data Definition Language is a column or a set of columns that uniquely identifies each row in a table.

A primary key in SQL is used to perform mathematical calculations on the data in the table.

Primary key in SQL is a column that allows duplicate values in a table.

Primary key in SQL is used to store large amounts of text data in a table.

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the purpose of the SQL UPDATE statement? Provide an example.

To insert new records into a table. Example: UPDATE table_name VALUES (value1, value2)

To create a new table in the database. Example: UPDATE new_table_name

To modify existing records in a table. Example: UPDATE table_name SET column1 = value1 WHERE condition;

To delete all records in a table. Example: UPDATE table_name

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?