NEW
Font size
WorksheetsSQL Command Quiz
Total questions: 15
Worksheet time: 8mins
Which SQL command is used to fetch data from a table?
GET
FETCH
SELECT
READ
Which clause is used to filter rows before grouping?
HAVING
WHERE
ORDER BY
GROUP BY
Which aggregate function returns the total number of rows?
SUM()
COUNT()
AVG()
COUNT(*)
What does AVG() return?
Highest value
Lowest value
Average value
Total count
Which clause is mandatory when using aggregate functions with non-aggregated columns?
WHERE
ORDER BY
GROUP BY
HAVING
Which function returns the highest value in a column?
TOP()
HIGH()
MAX()
LARGE()
Which clause is used to filter grouped data?
WHERE
HAVING
GROUP BY
ORDER BY
Which JOIN returns only matching rows from both tables?
LEFT JOIN
RIGHT JOIN
FULL JOIN
INNER JOIN
Which JOIN returns all rows from the left table and matching rows from the right table?
INNER JOIN
LEFT JOIN
RIGHT JOIN
FULL JOIN
Which JOIN returns all rows from both tables including unmatched rows?
INNER JOIN
LEFT JOIN
RIGHT JOIN
FULL OUTER JOIN
What happens if COUNT(column_name) is used?
Counts all rows
Counts only non-NULL values
Counts duplicate values
Counts columns
Which keyword is used to sort query results?
SORT
FILTER
ORDER BY
GROUP BY
Which JOIN is used when matching data from the same table?
INNER JOIN
LEFT JOIN
SELF JOIN
FULL JOIN
Which aggregate function returns the smallest value?
MIN()
LOW()
SMALL()
MIN()
Which of the following is NOT an aggregate function?
SUM()
COUNT()
AVG()
ORDER BY
