Which of the following is NOT a valid SQL data type?
FLOAT
INTEGER
BOOLEAN
VARCHAR
What is the function of the SQL 'WHERE' clause?
To filter records based on a specified condition
To order the results of a query
To group rows with the same value in a certain column
To limit the number of rows returned by a query
How would you sort results in descending order by the 'date_created' column?
ORDER BY date_created DESC
SORT BY date_created DESC
SORT BY date_created ASC
ORDER BY date_created ASC
Which type of subquery is used to check if a value exists in a list of values returned by another query?
IN Subquery
EXISTS Subquery
Nested Subquery
Correlated Subquery
In which scenario would a subquery be a more suitable choice than a JOIN operation?
When you need to combine data from multiple tables based on a common column.
When you need to filter data based on a condition that involves a separate query.
When you need to update data in one table based on data from another table.
When you need to sort data from multiple tables based on a common column.
You want to select the department with the highest average salary. What SQL clause would you use to filter the grouped results based on the calculated average salary?
LIMIT
WHERE
ORDER BY
HAVING
Which data type would be most suitable for storing a person's last name in a SQL database?
DATE
DECIMAL
Which aggregate function would you use to find the highest value in a column?
AVG()
SUM()
MAX()
MIN()
What is the primary clause used to retrieve data from a table in SQL?
RETRIEVE
FETCH
SELECT
GET
Which SQL statement is used to add new rows into a table?
ADD
APPEND
CREATE
INSERT