0
0
MySQLquery~10 mins

ROUND, CEIL, FLOOR in MySQL - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to round the value 3.7 to the nearest whole number.

MySQL
SELECT [1](3.7);
Drag options to blanks, or click blank then click option'
ATRUNCATE
BCEIL
CFLOOR
DROUND
Attempts:
3 left
💡 Hint
Common Mistakes
Using CEIL or FLOOR instead of ROUND when the goal is nearest rounding.
2fill in blank
medium

Complete the code to get the smallest integer greater than or equal to 5.2.

MySQL
SELECT [1](5.2);
Drag options to blanks, or click blank then click option'
AFLOOR
BROUND
CCEIL
DTRUNCATE
Attempts:
3 left
💡 Hint
Common Mistakes
Using FLOOR instead of CEIL, which rounds down.
3fill in blank
hard

Fix the error in the code to get the largest integer less than or equal to 7.9.

MySQL
SELECT [1](7.9);
Drag options to blanks, or click blank then click option'
AFLOOR
BCEIL
CROUND
DTRUNCATE
Attempts:
3 left
💡 Hint
Common Mistakes
Using CEIL instead of FLOOR, which rounds up.
4fill in blank
hard

Fill both blanks to round 4.567 to 2 decimal places and then get the ceiling of the result.

MySQL
SELECT CEIL([1](4.567, [2]));
Drag options to blanks, or click blank then click option'
AROUND
BCEIL
C2
D3
Attempts:
3 left
💡 Hint
Common Mistakes
Using CEIL inside CEIL or wrong decimal places.
5fill in blank
hard

Fill all three blanks to get the floor of 9.876 after rounding it to 1 decimal place.

MySQL
SELECT [1]([2](9.876, [3]));
Drag options to blanks, or click blank then click option'
AFLOOR
BROUND
C1
D2
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up FLOOR and CEIL or wrong decimal places.