Basics
Filtering and Sorting
Working with NULLs
Table Operations
Errors
100

What SQL keyword is used to retrieve data from a database?

What is "SELECT"?

100

What clause is used to sort results in SQL?

What is "ORDER BY"?

100

What does NULL represent in SQL?

What is "An unknown or missing value"?

100

What SQL statement is used to create a new table?

What is "CREATE NEW TABLE"?

100

Identify the error in the query:

SELECT * FROM employees

WHERE salary > 50000 AND;

What is "The AND operator is used but no condition follows it. Every AND must connect two conditions"

200

What clause do you use to filter records returned by a SELECT statement?

What is "WHERE"?

200

How do you sort results in descending order?

What is "ORDER BY column_name DESC"?

200

How do you check for NULL values in a column?

What is "By using IS NULL or IS NOT NULL"?


200

What command do you use to add a new column to an existing table?


What is "ALTER TABLE...ADD"

200

Identify the error in the query:

SELECT * FROM sales

WHERE (region = 'West' AND) (amount > 1000);

What is "No operator (like AND or OR) connecting the two parentheses groups properly"

300

What is the default order of records returned in a SELECT query if no ORDER BY is used?

What is no specific order?

300

What operator would you use to filter for values between two numbers?

What is "BETWEEN"?

300

By inputing this command, what information would you be requesting?

SELECT *

FROM customers

WHERE email IS NULL;

What is customers emails that are either unknown or missing?

300

True or False: You can rename a column directly in all SQL databases using the same ALTER TABLE syntax.

What is False

Explanation: The syntax for renaming a column varies between SQL databases, and some do not support direct renaming.

300

Identify the error in the query:

SELECT department_id, COUNT(employee_id)

FROM employees;

What is "Mixing aggregated and non-aggregated columns without GROUP BY"