What is the purpose of the 'LIMIT' clause in SQL?
It filters rows based on a condition.
It groups rows with the same values.
It sorts the result set.
It restricts the number of rows returned by the query.
What is the purpose of the COUNT() function in SQL?
COUNT()
Returns the average value of a column
Calculates the sum of values in a column
Finds the minimum value in a column
Returns the number of rows in a table
Which aggregate function would you use to find the highest value in a column?
MAX()
SUM()
MIN()
AVG()
Which data type would be most suitable for storing a person's last name in a SQL database?
INTEGER
VARCHAR
DECIMAL
DATE
How would you select the top 5 highest-scoring games from a table named 'games' with a column called 'score'?
SELECT * FROM games ORDER BY score ASC LIMIT 5;
SELECT TOP 5 * FROM games ORDER BY score DESC;
SELECT * FROM games ORDER BY score DESC LIMIT 5;
SELECT * FROM games WHERE score LIMIT 5;
In which scenario would a subquery be a more suitable choice than a JOIN operation?
When you need to update data in one table based on data from another table.
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 sort data from multiple tables based on a common column.
What is the result of SELECT NOW(); in SQL?
SELECT NOW();
Current time
An error message
Current date and time
Current date
What type of join returns all rows from both tables, regardless of whether there is a match?
FULL OUTER JOIN
INNER JOIN
RIGHT JOIN
LEFT JOIN
To modify existing data in a table, which SQL statement would you use?
MODIFY
CHANGE
ALTER
UPDATE
What is the primary clause used to retrieve data from a table in SQL?
GET
SELECT
RETRIEVE
FETCH