Font size
WorksheetsCS10337 - Lecture # 11
Total questions: 10
Worksheet time: 3mins
True or False:
The GROUP BY clause is used to combine rows that share the same values into summary rows.
True
False
True or False:
The HAVING clause filters individual rows before grouping occurs.
True
False
True or False:
The REPLACE() string function can substitute part of a string with another substring.
True
False
True or False:
The TRUNCATE() numeric function rounds values to the nearest decimal.
True
False
True or False:
The DATEDIFF() function calculates the number of days between two dates.
True
False
Which of the following are valid MySQL aggregate functions?
SUM()
AVG()
CONCAT()
COUNT()
Which of the following statements about GROUP BY and HAVING are correct?
GROUP BY is used to group rows based on one or more columns.
HAVING is used to filter groups after aggregation.
HAVING works the same as WHERE.
Both can be used in the same query.
Which of the following string functions remove spaces or modify text?
LTRIM()
RTRIM()
REPLACE()
LENGTH()
Which of the following numeric functions can be used to round or cut off decimals?
ROUND()
TRUNCATE()
ABS()
CEILING()
Which of the following date functions can perform arithmetic or extract values?
DATE_ADD()
DATEDIFF()
EXTRACT()
CONCAT()
