wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

CS10337 - Lecture # 11

Total questions: 10

Worksheet time: 3mins

Name
Class
Date
1.

True or False:
The GROUP BY clause is used to combine rows that share the same values into summary rows.

a)

True

b)

False

2.

True or False:
The HAVING clause filters individual rows before grouping occurs.

a)

True

b)

False

3.

True or False:
The REPLACE() string function can substitute part of a string with another substring.

a)

True

b)

False

4.

True or False:
The TRUNCATE() numeric function rounds values to the nearest decimal.

a)

True

b)

False

5.

True or False:
The DATEDIFF() function calculates the number of days between two dates.

a)

True

b)

False

6.

Which of the following are valid MySQL aggregate functions?

a)

SUM()

b)

AVG()

c)

CONCAT()

d)

COUNT()

7.

Which of the following statements about GROUP BY and HAVING are correct?

a)

GROUP BY is used to group rows based on one or more columns.

b)

HAVING is used to filter groups after aggregation.

c)

HAVING works the same as WHERE.

d)

Both can be used in the same query.

8.

Which of the following string functions remove spaces or modify text?

a)

LTRIM()

b)

RTRIM()

c)

REPLACE()

d)

LENGTH()

9.

Which of the following numeric functions can be used to round or cut off decimals?

a)

ROUND()

b)

TRUNCATE()

c)

ABS()

d)

CEILING()

10.

Which of the following date functions can perform arithmetic or extract values?

a)

DATE_ADD()

b)

DATEDIFF()

c)

EXTRACT()

d)

CONCAT()